本文整理汇总了C++中DB_HOST::fpops_percentile方法的典型用法代码示例。如果您正苦于以下问题:C++ DB_HOST::fpops_percentile方法的具体用法?C++ DB_HOST::fpops_percentile怎么用?C++ DB_HOST::fpops_percentile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_HOST
的用法示例。
在下文中一共展示了DB_HOST::fpops_percentile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle_trickle_init
int handle_trickle_init(int argc, char** argv) {
int retval;
for (int i=1; i<argc; i++) {
if (!strcmp(argv[i], "--max_runtime")) {
max_runtime = atof(argv[++i]);
} else {
log_messages.printf(MSG_CRITICAL, "unknown arg %s\n", argv[i]);
return ERR_XML_PARSE;
}
}
if (!max_runtime) {
log_messages.printf(MSG_CRITICAL, "missing --max_runtime arg\n");
return ERR_NULL;
}
DB_HOST host;
retval = host.fpops_percentile(50, flops_50_percentile);
if (retval) {
log_messages.printf(MSG_CRITICAL, "fpops_percentile failed: %d\n", retval);
return retval;
}
retval = host.fpops_percentile(95, flops_95_percentile);
if (retval) {
log_messages.printf(MSG_CRITICAL, "fpops_percentile failed: %d\n", retval);
return retval;
}
log_messages.printf(MSG_NORMAL, "default FLOPS: %f\n", flops_50_percentile);
log_messages.printf(MSG_NORMAL, "max FLOPS: %f\n", flops_95_percentile);
log_messages.printf(MSG_NORMAL, "max runtime: %f\n", max_runtime);
return 0;
}
示例2: get_from_db
int PERF_INFO::get_from_db() {
int retval, n;
DB_HOST host;
host_fpops_mean = 2.2e9;
host_fpops_stddev = .7e9;
host_fpops_50_percentile = 3.3e9;
host_fpops_95_percentile = 3.3e9;
retval = host.count(n);
if (retval) return retval;
if (n < 10) return 0;
retval = host.fpops_mean(host_fpops_mean);
retval = host.fpops_stddev(host_fpops_stddev);
retval = host.fpops_percentile(50, host_fpops_50_percentile);
retval = host.fpops_percentile(95, host_fpops_95_percentile);
return 0;
}