提交 0632f458 编写于 作者: W wuchenghui

fix benchmark

上级 edfa4923
......@@ -37,9 +37,7 @@ Benchmark::Benchmark(const char *name, void (*benchmark_func)(int))
Register();
}
// Run all benchmarks
void Benchmark::Run() { Run("all"); }
// Run all benchmarks that matches the pattern
void Benchmark::Run(const char *pattern) {
if (!all_benchmarks) return;
......
......@@ -20,10 +20,9 @@
#include <utility>
#include <vector>
#define MACE_BENCHMARK_CONCAT(a, b, c) a##b##c
#define MACE_BENCHMARK(n) \
static ::mace::testing::Benchmark *MACE_BENCHMARK_CONCAT( \
__benchmark_, n, __LINE__) = (new ::mace::testing::Benchmark(#n, (n)))
#define MACE_BENCHMARK(n) \
static ::mace::testing::Benchmark *__benchmark_##n = \
(new ::mace::testing::Benchmark(#n, (n)))
namespace mace {
namespace testing {
......@@ -32,7 +31,6 @@ class Benchmark {
public:
Benchmark(const char *name, void (*benchmark_func)(int));
static void Run();
static void Run(const char *pattern);
private:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册