From 214078cfe75c610c6823cda46a2c5705b1bbd607 Mon Sep 17 00:00:00 2001 From: Jian Cai Date: Sat, 6 Jul 2019 11:49:37 -0700 Subject: toolchain-utils: migrate Telemetry tests results from chartjson to histograms Shift to histograms as charjson format is being deprected for Telemtry tests BUG=chromium:967868 TEST=Local tests. Change-Id: I0645c6f10a93a454cc50090d2b790c9f386d9358 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1691318 Reviewed-by: Manoj Gupta Tested-by: Jian Cai --- cros_utils/tabulator.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cros_utils') diff --git a/cros_utils/tabulator.py b/cros_utils/tabulator.py index ed93de7a..e2f27bc4 100644 --- a/cros_utils/tabulator.py +++ b/cros_utils/tabulator.py @@ -2,6 +2,7 @@ # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + """Table generating, analyzing and printing functions. This defines several classes that are used to generate, analyze and print @@ -670,6 +671,13 @@ class KeyAwareComparisonResult(ComparisonResult): """Automatic key aware comparison.""" def _IsLowerBetter(self, key): + # Units in histograms should include directions + if 'smallerIsBetter' in key: + return True + if 'biggerIsBetter' in key: + return False + + # For units in chartjson: # TODO(llozano): Trying to guess direction by looking at the name of the # test does not seem like a good idea. Test frameworks should provide this # info explicitly. I believe Telemetry has this info. Need to find it out. -- cgit v1.2.3