runtime/vm/benchmark_test.cc
//
// Measure compile of all functions in dart core lib classes.
//
Measure compile of all functions in dart core lib classes.
Measure compile of all functions in dart core lib classes .
BENCHMARK(CorelibCompileAll) {
  bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary);
  bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
  bin::Builtin::SetNativeResolver(bin::Builtin::kCLILibrary);
  TransitionNativeToVM transition(thread);
  StackZone zone(thread);
  HANDLESCOPE(thread);
  Timer timer(true, "Compile all of Core lib benchmark");
  timer.Start();
  const Error& error =
      Error::Handle(Library::CompileAll(true));
  if (!error.IsNull()) {
    OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s",
                 error.ToErrorCString());
  }
  timer.Stop();
  int64_t elapsed_time = timer.TotalElapsedTime();
  benchmark->set_score(elapsed_time);
}
BENCHMARK ( CorelibCompileAll ) { bin :: Builtin :: SetNativeResolver ( bin :: Builtin :: kBuiltinLibrary ) ; bin :: Builtin :: SetNativeResolver ( bin :: Builtin :: kIOLibrary ) ; bin :: Builtin :: SetNativeResolver ( bin :: Builtin :: kCLILibrary ) ; TransitionNativeToVM transition ( thread ) ; StackZone zone ( thread ) ; HANDLESCOPE ( thread ) ; Timer timer ( true , " " ) ; timer . Start ( ) ; const Error & error = Error :: Handle ( Library :: CompileAll ( true ) ) ; if ( ! error . IsNull ( ) ) { OS :: PrintErr ( " \n " , error . ToErrorCString ( ) ) ; } timer . Stop ( ) ; int64_t elapsed_time = timer . TotalElapsedTime ( ) ; benchmark -> set_score ( elapsed_time ) ; }
Measure compile of all functions in dart core lib classes.
Measure compile of all functions in dart core lib classes .
/*ignore_error=*/