| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Native Client Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <stdint.h> | |
| 6 #include <stdio.h> | |
| 7 #include <stdlib.h> | |
| 8 #include <string.h> | |
| 9 #include <unistd.h> | |
| 10 | |
| 11 #include <string> | |
| 12 | |
| 13 // @EXEMPTION[include] | |
| 14 #include "./framework.h" | |
| 15 | |
| 16 extern "C" { | |
| 17 int main_binarytrees(int argc, const char* argv[]); | |
| 18 } | |
| 19 | |
| 20 namespace { | |
| 21 | |
| 22 // Wrap BinaryTrees in benchmark harness | |
| 23 class BenchmarkBinaryTrees : public Benchmark { | |
| 24 public: | |
| 25 virtual int Run() { | |
| 26 const char *args[] = {"binarytrees", "12"}; | |
| 27 return main_binarytrees(1, args); | |
| 28 } | |
| 29 virtual const std::string Name() { return "BinaryTrees"; } | |
| 30 virtual const std::string Notes() { return "c version"; } | |
| 31 }; | |
| 32 | |
| 33 } // namespace | |
| 34 | |
| 35 // Register an instance to the list of benchmarks to be run. | |
| 36 RegisterBenchmark<BenchmarkBinaryTrees> benchmark_binarytrees; | |
| OLD | NEW |