From 18b73dd0b63f6fdb8e8febf3b860038fa46f69da Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 4 Aug 2020 00:58:40 +0000 Subject: [PATCH] perfboot: significant figures + units for summary This is correct significant figures/units based on the precision of our measurements, but it does not reflect our actual certainty re the output data, since in reality, confidence is diminished by temperature, device, hardware revision, time of day/month/year, spurious activity, data connectivity, app install list, inherent randomness of multiprogramming, sensor activity, user interaction, /data caches, build-by-build differences, charging state, data fragmentation, race-driven sleeps, cosmic radiation, factory defects, local magnetic or gravitational field differences, changes in device momentum, or other known and unknown causes. Bug: N/A Test: run perfboot.py, and output has: mean: 10801 ms median: 10801 ms standard deviation: 18 ms Change-Id: I796396acc203b29e9a14e4d6dffa58db7b8cd9fb --- init/perfboot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/perfboot.py b/init/perfboot.py index 713290bcd..4b23ad28c 100755 --- a/init/perfboot.py +++ b/init/perfboot.py @@ -349,9 +349,9 @@ def print_summary(record_list, end_tag): # Filter out invalid data. end_times = [get_last_value(record, end_tag) for record in record_list if get_last_value(record, end_tag) != 0] - print 'mean: ', mean(end_times) - print 'median:', median(end_times) - print 'standard deviation:', stddev(end_times) + print 'mean:', int(round(mean(end_times))), 'ms' + print 'median:', int(round(median(end_times))), 'ms' + print 'standard deviation:', int(round(stddev(end_times))), 'ms' def do_iteration(device, interval_adjuster, event_tags_re, end_tag):