Lines Matching defs:BENCHMARK
29 class Benchmark;
33 void BenchmarkRegister(Benchmark* bm);
36 class Benchmark {
38 Benchmark(const char* name, void (*fn)(int)) : name_(strdup(name)), fn_(fn) {
41 Benchmark(const char* name) : name_(strdup(name)), fn_(NULL) {}
43 virtual ~Benchmark() {
59 class BenchmarkWantsArgBase : public Benchmark {
61 BenchmarkWantsArgBase(const char* name, void (*fn)(int, T)) : Benchmark(name) {
71 virtual void RunFn(int) { printf("can't run arg benchmark %s without arg\n", Name()); }
118 static inline Benchmark* BenchmarkFactory(const char* name, void (*fn)(int)) {
119 return new Benchmark(name, fn);
130 static inline void BenchmarkAddArg(::testing::Benchmark* b, const char* name, T arg) {
143 #define BENCHMARK(f) \
144 static ::testing::Benchmark* _benchmark_##f __attribute__((unused)) = \
145 (::testing::Benchmark*)::testing::BenchmarkFactory(#f, f)