mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Correct BM_ShellInitializationAndShutdown (#18829)
This commit is contained in:
parent
43ad8347e1
commit
137320b5c7
@ -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(); });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user