Index: tools/telemetry/telemetry/core/platform/power_monitor/msr_power_monitor_unittest.py |
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py b/tools/telemetry/telemetry/core/platform/power_monitor/msr_power_monitor_unittest.py |
similarity index 60% |
copy from tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py |
copy to tools/telemetry/telemetry/core/platform/power_monitor/msr_power_monitor_unittest.py |
index 17ff4cb1235500229c9c2a804c41d699f16ae815..f51e020ad09cffda4113cab33b194b3847172e2e 100644 |
--- a/tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py |
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/msr_power_monitor_unittest.py |
@@ -1,30 +1,31 @@ |
-# Copyright 2014 The Chromium Authors. All rights reserved. |
-# Use of this source code is governed by a BSD-style license that can be |
-# found in the LICENSE file. |
- |
-import logging |
-import unittest |
- |
-from telemetry import decorators |
-from telemetry.core.platform import win_platform_backend |
-from telemetry.core.platform.power_monitor import ippet_power_monitor |
- |
- |
-class IppetPowerMonitorTest(unittest.TestCase): |
- @decorators.Enabled('win') |
- def testFindOrInstallIppet(self): |
- self.assertTrue(ippet_power_monitor.IppetPath()) |
- |
- @decorators.Enabled('win') |
- def testIppetRunsWithoutErrors(self): |
- # Very basic test, doesn't validate any output data. |
- platform_backend = win_platform_backend.WinPlatformBackend() |
- power_monitor = ippet_power_monitor.IppetPowerMonitor(platform_backend) |
- if not power_monitor.CanMonitorPower(): |
- logging.warning('Test not supported on this platform.') |
- return |
- |
- power_monitor.StartMonitoringPower(None) |
- statistics = power_monitor.StopMonitoringPower() |
- |
- self.assertEqual(statistics['identifier'], 'ippet') |
+# Copyright 2014 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import logging |
+import unittest |
+ |
+from telemetry import decorators |
+from telemetry.core.platform import win_platform_backend |
+from telemetry.core.platform.power_monitor import msr_power_monitor |
+ |
+ |
+class MsrPowerMonitorTest(unittest.TestCase): |
+ @decorators.Enabled('win') |
+ def testFindOrInstallWinRing0(self): |
+ self.assertTrue(msr_power_monitor.WinRing0Path()) |
+ |
+ @decorators.Enabled('win') |
+ def testMsrRunsWithoutErrors(self): |
+ # Very basic test, doesn't validate any output data. |
+ platform_backend = win_platform_backend.WinPlatformBackend() |
+ power_monitor = msr_power_monitor.MsrPowerMonitor(platform_backend) |
+ if not power_monitor.CanMonitorPower(): |
+ logging.warning('Test not supported on this platform.') |
+ return |
+ |
+ power_monitor.StartMonitoringPower(None) |
+ statistics = power_monitor.StopMonitoringPower() |
+ |
+ self.assertEqual(statistics['identifier'], 'msr') |
+ self.assertIn('energy_consumption_mwh', statistics) |