46 uint64_t elapsed = b->
end - b->
start;
48 r->
ratio = (double) nominal / (
double) elapsed;
54 char *prefix = getenv(
"BENCHMARK_PREFIX");
56 printf(
"%s%-40s Bandwidth %6.2fx CPU load %6.3f%%\n",
57 (prefix ? prefix :
""),
uint64_t time64_now(void)
bool rf_benchmark_running(rf_benchmark_t *b)
void rf_benchmark_finalize(rf_benchmark_t *b, uint64_t nominal, rf_benchmark_results_t *r)
void rf_benchmark_results_show(rf_benchmark_results_t *r, const char *tag)
void rf_benchmark_init(rf_benchmark_t *b, uint64_t runtime)
double ratio
Degree by which we run faster than real time (x2 mean twice)
double cpu_usage
Estimated CPU usage at x1.