Skip to content
Commit 5de4d659 authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

rework LatencyTracker for testing

Modify the VisibleForTesting methods of the LatencyTracker class to
improve the testibility. The class is modified to support overriding
callbacks when actions/outcomes are taken by LatencyTracker based on
its inputs.

Test classes using LatencyTracker can now verify:
1. When PerfettoTrigger has been triggered
2. When FrameworkStatsLog is written to

This CL fixes a bug where only the global enable flag is
checked when calling onActionStart and onActionEnd. It also
adds a new enabled check for when the public logAction API is called.

Test: atest LatencyTrackerTest
Bug: 269254242
Change-Id: I4f8d21bca4a9e52fb3875e88387b8c8641f64c94
parent 31302573
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment