| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef __BENCH_REPORTER_H__ |
| 20 |
#define __BENCH_REPORTER_H__ |
| 21 |
|
| 22 |
#include <glib-object.h> |
| 23 |
|
| 24 |
G_BEGIN_DECLS |
| 25 |
|
| 26 |
#define BENCH_TYPE_REPORTER (bench_reporter_get_type()) |
| 27 |
#define BENCH_REPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BENCH_TYPE_REPORTER, BenchReporter)) |
| 28 |
#define BENCH_REPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), BENCH_TYPE_REPORTER, BenchReporterClass)) |
| 29 |
#define BENCH_IS_REPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BENCH_TYPE_REPORTER)) |
| 30 |
#define BENCH_IS_REPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BENCH_TYPE_REPORTER)) |
| 31 |
#define BENCH_REPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BENCH_TYPE_REPORTER, BenchReporterClass)) |
| 32 |
|
| 33 |
typedef struct _BenchReporter BenchReporter; |
| 34 |
typedef struct _BenchReporterClass BenchReporterClass; |
| 35 |
|
| 36 |
typedef void (*BenchSetupFunc) (gpointer user_data); |
| 37 |
typedef void (*BenchFunc) (gpointer user_data); |
| 38 |
typedef void (*BenchTeardownFunc) (gpointer user_data); |
| 39 |
|
| 40 |
struct _BenchReporter |
| 41 |
{ |
| 42 |
GObject object; |
| 43 |
}; |
| 44 |
|
| 45 |
struct _BenchReporterClass |
| 46 |
{ |
| 47 |
GObjectClass parent_class; |
| 48 |
}; |
| 49 |
|
| 50 |
GType bench_reporter_get_type (void); |
| 51 |
|
| 52 |
BenchReporter *bench_reporter_new (void); |
| 53 |
void bench_reporter_register (BenchReporter *reporter, |
| 54 |
const gchar *label, |
| 55 |
gint n, |
| 56 |
BenchSetupFunc bench_setup, |
| 57 |
BenchFunc bench, |
| 58 |
BenchTeardownFunc bench_teardown, |
| 59 |
gpointer data); |
| 60 |
void bench_reporter_run (BenchReporter *reporter); |
| 61 |
|
| 62 |
#endif |