Skip to content

Commit

Permalink
Correct BM_ShellInitializationAndShutdown (flutter#18829)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuqian authored Jun 17, 2020
1 parent 43ad834 commit 137320b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shell/common/shell_benchmarks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ static void StartupAndShutdownShell(benchmark::State& state,
// The ui thread could be busy processing tasks after shell created, e.g.,
// default font manager setup. The measurement of shell shutdown should be
// considered after those ui tasks have been done.
benchmarking::ScopedPauseTiming pause(state, true);
//
// However, if we're measuring the complete time from startup to shutdown,
// this time should still be included.
benchmarking::ScopedPauseTiming pause(
state, !measure_shutdown || !measure_startup);
fml::AutoResetWaitableEvent latch;
fml::TaskRunner::RunNowOrPostTask(thread_host->ui_thread->GetTaskRunner(),
[&latch]() { latch.Signal(); });
Expand Down

0 comments on commit 137320b

Please sign in to comment.