runtime/vm/benchmark_test.cc
//
// Measure creation of core isolate from a snapshot.
//
Measure creation of core isolate from a snapshot.
Measure creation of core isolate from a snapshot .
BENCHMARK(CorelibIsolateStartup) {
  const int kNumIterations = 1000;
  Timer timer(true, "CorelibIsolateStartup");
  Isolate* isolate = thread->isolate();
  Dart_ExitIsolate();
  for (int i = 0; i < kNumIterations; i++) {
    timer.Start();
    TestCase::CreateTestIsolate();
    timer.Stop();
    Dart_ShutdownIsolate();
  }
  benchmark->set_score(timer.TotalElapsedTime() / kNumIterations);
  Dart_EnterIsolate(reinterpret_cast<Dart_Isolate>(isolate));
}
BENCHMARK ( CorelibIsolateStartup ) { const int kNumIterations = 1000 ; Timer timer ( true , " " ) ; Isolate * isolate = thread -> isolate ( ) ; Dart_ExitIsolate ( ) ; for ( int i = 0 ; i < kNumIterations ; i ++ ) { timer . Start ( ) ; TestCase :: CreateTestIsolate ( ) ; timer . Stop ( ) ; Dart_ShutdownIsolate ( ) ; } benchmark -> set_score ( timer . TotalElapsedTime ( ) / kNumIterations ) ; Dart_EnterIsolate ( reinterpret_cast < Dart_Isolate > ( isolate ) ) ; }
Measure creation of core isolate from a snapshot.
Measure creation of core isolate from a snapshot .