Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Correct BM_ShellInitializationAndShutdown #18829

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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