Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: runtime/vm/benchmark_test.cc

Issue 1684073007: Disable background compilation for compile all benchmarks (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: const Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/benchmark_test.cc
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index f626ee9ed2d98b56aba5ec0a8f9ec618d9b432b8..e8a507402bccb2463d8faf899b09e0238c2d6864 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -20,6 +20,8 @@ using dart::bin::File;
namespace dart {
+DECLARE_FLAG(bool, background_compilation);
+
Benchmark* Benchmark::first_ = NULL;
Benchmark* Benchmark::tail_ = NULL;
const char* Benchmark::executable_ = NULL;
@@ -338,7 +340,10 @@ BENCHMARK(Dart2JSCompileAll) {
}
Timer timer(true, "Compile all of dart2js benchmark");
timer.Start();
+ const bool old_flag = FLAG_background_compilation;
+ FLAG_background_compilation = false;
Dart_Handle result = Dart_CompileAll();
+ FLAG_background_compilation = old_flag;
EXPECT_VALID(result);
timer.Stop();
int64_t elapsed_time = timer.TotalElapsedTime();
@@ -373,7 +378,10 @@ BENCHMARK(Dart2JSCompilerStats) {
stats->EnableBenchmark();
Timer timer(true, "Compile all of dart2js benchmark");
timer.Start();
+ const bool old_flag = FLAG_background_compilation;
+ FLAG_background_compilation = false;
Dart_Handle result = Dart_CompileAll();
+ FLAG_background_compilation = old_flag;
EXPECT_VALID(result);
timer.Stop();
int64_t elapsed_time = timer.TotalElapsedTime();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698