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

Commit 6807d26

Browse files
committed
Correct BM_ShellInitializationAndShutdown
This fixes flutter/flutter#58704
1 parent b36c837 commit 6807d26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shell/common/shell_benchmarks.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ static void StartupAndShutdownShell(benchmark::State& state,
7070
// The ui thread could be busy processing tasks after shell created, e.g.,
7171
// default font manager setup. The measurement of shell shutdown should be
7272
// considered after those ui tasks have been done.
73-
benchmarking::ScopedPauseTiming pause(state, true);
73+
//
74+
// However, if we're measuring the complete time from startup to shutdown,
75+
// this time should still be included.
76+
benchmarking::ScopedPauseTiming pause(
77+
state, !measure_shutdown || !measure_startup);
7478
fml::AutoResetWaitableEvent latch;
7579
fml::TaskRunner::RunNowOrPostTask(thread_host->ui_thread->GetTaskRunner(),
7680
[&latch]() { latch.Signal(); });

0 commit comments

Comments
 (0)