From T368073, we identified that TimingMetric->start() and stop() cannot handle recursive use, and samples must be recorded in a single operation. This caused issues in: T367110: PagedTiffHandler phpunit failure on TimingMetric and T367928: TimingMetric warning on File: page after uploading video file.
Can we provide a helper function to make this easier? And this maybe help us move closer to T245464?