sweetberry: add microsecond to sweetberry timestamp

This CL adds microsecond to sweetberry timestamp, for more
accuracy in timing sweetberry runs.

This CL is part of the effort to start sweetberry measurements
while running power autotests.

BRANCH=None
BUG=b:68956240
TEST=./powerlog.py -b xxx.board -c xxx.scenario \
--save_stats_json [directory to store it]

Change-Id: I68c40d5be6d684205b49428c4e5cb6e69af6dfdf
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/812502
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
This commit is contained in:
Mengqi Guo
2017-12-06 15:47:24 -08:00
committed by chrome-bot
parent 6464854a96
commit fec861cd49

View File

@@ -648,7 +648,7 @@ class powerlog(object):
self._data.CalculateStats()
if self._print_stats:
self._data.PrintSummary()
save_dir = datetime.datetime.now().strftime('sweetberry%Y%m%d%H%M%S')
save_dir = datetime.datetime.now().strftime('sweetberry%Y%m%d%H%M%S.%f')
if self._stats_dir:
stats_dir = os.path.join(self._stats_dir, save_dir)
self._data.SaveSummary(stats_dir)