librfn
An ad-hoc utility library
|
Benchmark mechanism for real-time processing modules. More...
Data Structures | |
struct | rf_benchmark_t |
struct | rf_benchmark_results_t |
Functions | |
void | rf_benchmark_init (rf_benchmark_t *b, uint64_t runtime) |
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) |
Benchmark mechanism for real-time processing modules.
This module contains library routines designed to estimate the CPU load of real-time data processing.
Rather than measure the CPU load directly the routine is run as fast as possible and the nominal time (number of minutes of data processed) is compared to the elapsed time.
void rf_benchmark_finalize | ( | rf_benchmark_t * | b, |
uint64_t | nominal, | ||
rf_benchmark_results_t * | r | ||
) |
Generate the benchmark results by comparing the actual runtime to the nominal runtime.
Definition at line 40 of file benchmark.c.
void rf_benchmark_init | ( | rf_benchmark_t * | b, |
uint64_t | runtime | ||
) |
Initialize a benchmark structure.
Definition at line 23 of file benchmark.c.
void rf_benchmark_results_show | ( | rf_benchmark_results_t * | r, |
const char * | tag | ||
) |
Definition at line 52 of file benchmark.c.
bool rf_benchmark_running | ( | rf_benchmark_t * | b | ) |
Test whether the benchmark has completed it's minimum runtime.
Definition at line 34 of file benchmark.c.