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>
diff --git a/metrics_utils.py b/metrics_utils.py
index 5df124a..2235a7f 100644
--- a/metrics_utils.py
+++ b/metrics_utils.py
@@ -183,15 +183,6 @@
return 1
-def seconds_to_weeks(duration):
- """Transform a |duration| from seconds to weeks approximately.
-
- Drops the lowest 19 bits of the integer representation, which ammounts to
- about 6 days.
- """
- return int(duration) >> 19
-
-
def extract_known_subcommand_args(args):
"""Extract the known arguments from the passed list of args."""
known_args = []
@@ -276,8 +267,7 @@
if p.returncode != 0:
return None
- # Get the age of the checkout in weeks.
- return seconds_to_weeks(stdout.strip())
+ return stdout.strip()
def print_boxed_text(out, min_width, lines):
[EW, NS, SE, SW, NE, NW] = list('=|++++')