diff options
author | Jian Cai <jiancai@google.com> | 2019-07-06 11:49:37 -0700 |
---|---|---|
committer | Jian Cai <jiancai@google.com> | 2019-07-09 23:24:06 +0000 |
commit | 214078cfe75c610c6823cda46a2c5705b1bbd607 (patch) | |
tree | 7dfb62c9503993f9cd51a15665ee79538df8d378 /cros_utils | |
parent | 38f3c42a535f0ec2d845c6e299738a4a1996f646 (diff) | |
download | toolchain-utils-214078cfe75c610c6823cda46a2c5705b1bbd607.tar.gz |
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 <manojgupta@chromium.org>
Tested-by: Jian Cai <jiancai@google.com>
Diffstat (limited to 'cros_utils')
-rw-r--r-- | cros_utils/tabulator.py | 8 |
1 files changed, 8 insertions, 0 deletions
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. |