OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "bin/file.h" | 7 #include "bin/file.h" |
8 | 8 |
9 #include "vm/benchmark_test.h" | 9 #include "vm/benchmark_test.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 run_matches++; | 45 run_matches++; |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 void Benchmark::RunBenchmark() { | 50 void Benchmark::RunBenchmark() { |
51 if ((run_filter == kAll) || | 51 if ((run_filter == kAll) || |
52 (run_filter == kAllBenchmarks) || | 52 (run_filter == kAllBenchmarks) || |
53 (strcmp(run_filter, this->name()) == 0)) { | 53 (strcmp(run_filter, this->name()) == 0)) { |
54 this->Run(); | 54 this->Run(); |
55 OS::Print("%s(RunTime): %"Pd"\n", this->name(), this->score()); | 55 OS::Print("%s(RunTime): %" Pd "\n", this->name(), this->score()); |
56 run_matches++; | 56 run_matches++; |
57 } else if (run_filter == kList) { | 57 } else if (run_filter == kList) { |
58 fprintf(stdout, "%s\n", this->name()); | 58 fprintf(stdout, "%s\n", this->name()); |
59 run_matches++; | 59 run_matches++; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 static void PrintUsage() { | 64 static void PrintUsage() { |
65 fprintf(stderr, "run_vm_tests [--list | --benchmarks | " | 65 fprintf(stderr, "run_vm_tests [--list | --benchmarks | " |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 return 0; | 123 return 0; |
124 } | 124 } |
125 | 125 |
126 } // namespace dart | 126 } // namespace dart |
127 | 127 |
128 | 128 |
129 int main(int argc, const char** argv) { | 129 int main(int argc, const char** argv) { |
130 return dart::Main(argc, argv); | 130 return dart::Main(argc, argv); |
131 } | 131 } |
OLD | NEW |