librfn
An ad-hoc utility library
libbench.h
Go to the documentation of this file.
1 /*
2  * libbench.h
3  *
4  * Part of librfn (a general utility library from redfelineninja.org.uk)
5  *
6  * Copyright (C) 2015 Daniel Thompson <daniel@redfelineninja.org.uk>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  */
13 
26 #include <assert.h>
27 #include <stdio.h>
28 #include <string.h>
29 
30 #include "librfn.h"
31 
32 enum {
38 };
39 
40 typedef struct {
45 
46 void benchmark_init(benchmark_results_t *results, fibre_t *wakeup);
48 const char *benchmark_get_result(benchmark_results_t *results, int n,
49  stats_t *s);
51 void benchmark_show_csv(benchmark_results_t *results, FILE *f);
52 
uint16_t pt_t
Definition: protothreads.h:86
void benchmark_show_results(benchmark_results_t *results)
Definition: libbench.c:223
const char * benchmark_get_result(benchmark_results_t *results, int n, stats_t *s)
Definition: libbench.c:213
void benchmark_show_csv(benchmark_results_t *results, FILE *f)
Definition: libbench.c:236
int benchmark_run_once(benchmark_results_t *results)
Definition: libbench.c:159
Definition: stats.h:41
fibre_t * wakeup
Definition: libbench.h:42
Fibre descriptor.
Definition: fibre.h:64
void benchmark_init(benchmark_results_t *results, fibre_t *wakeup)
Definition: libbench.c:151