Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: tools/perf/metrics/statistics_unittest.py

Issue 185953004: Add some statistics to the monsoon profile run (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebase and provide own statistics functions Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/perf/metrics/statistics_unittest.py
diff --git a/tools/perf/metrics/statistics_unittest.py b/tools/perf/metrics/statistics_unittest.py
index 78fe81ff1511a7d374c93728a6aee1b1f7a790a6..8b1ad62e7139ecc7fa9d3d37f9d39da15c75272c 100644
--- a/tools/perf/metrics/statistics_unittest.py
+++ b/tools/perf/metrics/statistics_unittest.py
@@ -5,7 +5,7 @@
import unittest
import random
-from metrics import statistics
+from telemetry.util import statistics
def Relax(samples, iterations=10):
@@ -158,13 +158,10 @@ class StatisticsUnitTest(unittest.TestCase):
def testArithmeticMean(self):
# The ArithmeticMean function computes the simple average.
- self.assertAlmostEquals(40/3.0, statistics.ArithmeticMean([10, 10, 20], 3))
- self.assertAlmostEquals(15.0, statistics.ArithmeticMean([10, 20], 2))
- # Both lists of values or single values can be given for either argument.
- self.assertAlmostEquals(40/3.0, statistics.ArithmeticMean(40, [1, 1, 1]))
+ self.assertAlmostEquals(40/3.0, statistics.ArithmeticMean([10, 10, 20]))
+ self.assertAlmostEquals(15.0, statistics.ArithmeticMean([10, 20]))
# If the 'count' is zero, then zero is returned.
- self.assertEquals(0, statistics.ArithmeticMean(4.0, 0))
- self.assertEquals(0, statistics.ArithmeticMean(4.0, []))
+ self.assertEquals(0, statistics.ArithmeticMean([]))
def testDurationsDiscrepancy(self):
durations = []

Powered by Google App Engine
This is Rietveld 408576698