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

Unified Diff: tools/telemetry/telemetry/core/platform/power_monitor/msr_power_monitor_unittest.py

Issue 553163004: [telemetry] Reland MSR power monitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/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 61%
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..6a28509f4dca89fe360654046b1f72a9829dec54 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
@@ -7,19 +7,19 @@ import unittest
from telemetry import decorators
from telemetry.core.platform import win_platform_backend
-from telemetry.core.platform.power_monitor import ippet_power_monitor
+from telemetry.core.platform.power_monitor import msr_power_monitor
-class IppetPowerMonitorTest(unittest.TestCase):
+class MsrPowerMonitorTest(unittest.TestCase):
@decorators.Enabled('win')
- def testFindOrInstallIppet(self):
- self.assertTrue(ippet_power_monitor.IppetPath())
+ def testFindOrInstallWinRing0(self):
+ self.assertTrue(msr_power_monitor.WinRing0Path())
@decorators.Enabled('win')
- def testIppetRunsWithoutErrors(self):
+ def testMsrRunsWithoutErrors(self):
# Very basic test, doesn't validate any output data.
platform_backend = win_platform_backend.WinPlatformBackend()
- power_monitor = ippet_power_monitor.IppetPowerMonitor(platform_backend)
+ power_monitor = msr_power_monitor.MsrPowerMonitor(platform_backend)
if not power_monitor.CanMonitorPower():
logging.warning('Test not supported on this platform.')
return
@@ -27,4 +27,5 @@ class IppetPowerMonitorTest(unittest.TestCase):
power_monitor.StartMonitoringPower(None)
statistics = power_monitor.StopMonitoringPower()
- self.assertEqual(statistics['identifier'], 'ippet')
+ self.assertEqual(statistics['identifier'], 'msr')
+ self.assertIn('energy_consumption_mwh', statistics)

Powered by Google App Engine
This is Rietveld 408576698