metrics: Collect full timestamps.

Update metrics.README.md and add a metrics_version field.

Bug: None
Change-Id: I17d9032bd787af2a6fc49f80d59e05152d5223b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1406256
Reviewed-by: Andy Perelson <ajp@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
Edward Lemur
2019-04-26 00:42:04 +00:00
committed by Commit Bot
parent 749139969f
commit 18df41e0cf
4 changed files with 9 additions and 16 deletions

View File

@@ -198,6 +198,7 @@ class MetricsCollector(object):
return func(*args, **kwargs)
self._collecting_metrics = True
self.add('metrics_version', metrics_utils.CURRENT_VERSION)
self.add('command', command_name)
try:
start = time.time()
@@ -213,7 +214,7 @@ class MetricsCollector(object):
self.add('exit_code', exit_code)
# Add metrics regarding environment information.
self.add('timestamp', metrics_utils.seconds_to_weeks(time.time()))
self.add('timestamp', time.time())
self.add('python_version', metrics_utils.get_python_version())
self.add('host_os', gclient_utils.GetMacWinOrLinux())
self.add('host_arch', detect_host_arch.HostArch())