| 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 "vm/benchmark_test.h" | 7 #include "vm/benchmark_test.h" |
| 8 #include "vm/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/unit_test.h" | 9 #include "vm/unit_test.h" |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 run_matches++; | 41 run_matches++; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 void Benchmark::RunBenchmark() { | 46 void Benchmark::RunBenchmark() { |
| 47 if ((run_filter == kAll) || | 47 if ((run_filter == kAll) || |
| 48 (run_filter == kAllBenchmarks) || | 48 (run_filter == kAllBenchmarks) || |
| 49 (strcmp(run_filter, this->name()) == 0)) { | 49 (strcmp(run_filter, this->name()) == 0)) { |
| 50 this->Run(); | 50 this->Run(); |
| 51 OS::Print("%s : %ld\n", this->name(), this->score()); | 51 OS::Print("%s(RunTime): %ld\n", this->name(), this->score()); |
| 52 run_matches++; | 52 run_matches++; |
| 53 } else if (run_filter == kList) { | 53 } else if (run_filter == kList) { |
| 54 fprintf(stdout, "%s\n", this->name()); | 54 fprintf(stdout, "%s\n", this->name()); |
| 55 run_matches++; | 55 run_matches++; |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 static void PrintUsage() { | 60 static void PrintUsage() { |
| 61 fprintf(stderr, "run_vm_tests [--list | --benchmarks | " | 61 fprintf(stderr, "run_vm_tests [--list | --benchmarks | " |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 return 0; | 114 return 0; |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace dart | 117 } // namespace dart |
| 118 | 118 |
| 119 | 119 |
| 120 int main(int argc, const char** argv) { | 120 int main(int argc, const char** argv) { |
| 121 return dart::Main(argc, argv); | 121 return dart::Main(argc, argv); |
| 122 } | 122 } |
| OLD | NEW |