Debian Codegraph @

benchmark/lib/bench-reporter.h

raw symbols SCIP
1 /*
2 Copyright (C) 2008 Kouhei Sutou <[email protected]>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 /* __BENCH_REPORTER_H__ */