29 static uint64_t end_time;
37 printf(
"Preparing ...");
44 printf(
"Benchmarking ");
46 for (i=0; i<50; i++) {
51 printf(
" done\nBenchmark completed in %4.2f seconds\n\n",
56 FILE *f = fopen(
"benchmark-results.csv",
"w");
68 int main(
int argc,
char *argv[])
#define containerof(ptr, type, member)
uint64_t time64_now(void)
Micro benchmark suite for some librfn features.
#define FIBRE_VAR_INIT(fn)
Static initializer for a fibre descriptor.
#define PT_SPAWN(child, thread)
Call a child thread.
void fibre_scheduler_main_loop(void)
int benchmark_run_once(benchmark_results_t *results)
int conductor_fibre(fibre_t *fibre)
conductor_fibre_t conductor
void benchmark_show_results(benchmark_results_t *results)
int main(int argc, char *argv[])
void benchmark_show_csv(benchmark_results_t *results, FILE *f)
benchmark_results_t results
void benchmark_init(benchmark_results_t *results, fibre_t *wakeup)
#define PT_BEGIN_FIBRE(f)
Fibre aware alternative to PT_BEGIN().
void fibre_run(fibre_t *f)