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 #ifndef VM_BENCHMARK_TEST_H_ | 5 #ifndef VM_BENCHMARK_TEST_H_ |
6 #define VM_BENCHMARK_TEST_H_ | 6 #define VM_BENCHMARK_TEST_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 char* err = NULL; | 59 char* err = NULL; |
60 isolate_ = Dart_CreateIsolate(NULL, buffer, NULL, &err); | 60 isolate_ = Dart_CreateIsolate(NULL, buffer, NULL, &err); |
61 EXPECT(isolate_ != NULL); | 61 EXPECT(isolate_ != NULL); |
62 free(err); | 62 free(err); |
63 return isolate_; | 63 return isolate_; |
64 } | 64 } |
65 | 65 |
66 void Run() { (*run_)(this); } | 66 void Run() { (*run_)(this); } |
67 void RunBenchmark(); | 67 void RunBenchmark(); |
68 | 68 |
69 static void RunAll(); | 69 static void RunAll(const char* executable); |
| 70 static void SetExecutable(const char* arg) { executable_ = arg; } |
| 71 static const char* Executable() { return executable_; } |
70 | 72 |
71 private: | 73 private: |
72 static Benchmark* first_; | 74 static Benchmark* first_; |
73 static Benchmark* tail_; | 75 static Benchmark* tail_; |
| 76 static const char* executable_; |
74 | 77 |
75 RunEntry* const run_; | 78 RunEntry* const run_; |
76 const char* name_; | 79 const char* name_; |
77 intptr_t score_; | 80 intptr_t score_; |
78 Dart_Isolate isolate_; | 81 Dart_Isolate isolate_; |
79 Benchmark* next_; | 82 Benchmark* next_; |
80 | 83 |
81 DISALLOW_COPY_AND_ASSIGN(Benchmark); | 84 DISALLOW_COPY_AND_ASSIGN(Benchmark); |
82 }; | 85 }; |
83 | 86 |
(...skipping 14 matching lines...) Expand all Loading... |
98 | 101 |
99 private: | 102 private: |
100 Benchmark* benchmark_; | 103 Benchmark* benchmark_; |
101 | 104 |
102 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); | 105 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); |
103 }; | 106 }; |
104 | 107 |
105 } // namespace dart | 108 } // namespace dart |
106 | 109 |
107 #endif // VM_BENCHMARK_TEST_H_ | 110 #endif // VM_BENCHMARK_TEST_H_ |
OLD | NEW |