Use sampling for faster measuring of CPU time
Calling SystemClock.currentThreadTimeMicro() is expensive (order of 1 microsecond). To mitigate that, we use sampling by measuring every 10th call for the given class/transaction combination and extrapolate results. Sampling is not used when --enable-detailed-tracking option is set, For more compact output, only 90th percentile is printed, unless -a option is set. Example output: Per-UID Summary (cpu_time, % of total cpu_time, call_count, exception_count, package/uid): 13095032 43% 44663 0 com.package1/u0a35 8872156 29% 5831 0 com.package2/u0a75 2379684 8% 1549 0 com.package3/u0a23 Test: manual dumpsys binder_calls_stats Test: BinderCallsStatsTest + BinderCallsStatsPerfTest Bug: 75318418 Change-Id: I535e796c17e75d70970e227411cdf0e1a4afd81c
Loading
Please register or sign in to comment