cr2: add new trace data
Now the in_power gets a "cpus" parameters instead of "clusters".
Update functions accordingly and tests to the new set of data.
diff --git a/tests/test_power.py b/tests/test_power.py
index 35fc964..51ea6a9 100644
--- a/tests/test_power.py
+++ b/tests/test_power.py
@@ -42,27 +42,25 @@
"""Test InPower.get_data_frame()"""
df = InPower().get_data_frame()
- self.assertEquals(df["load0"].iloc[0], 2)
+ self.assertEquals(df["load0"].iloc[0], 5)
self.assertTrue("load0" in df.columns)
def test_inpower_get_all_freqs(self):
"""Test InPower.get_all_freqs()"""
- map_label = {1: "A15",
- 0: "A7"}
- dfr = InPower().get_all_freqs(map_label)
+ dfr = InPower().get_all_freqs(self.map_label)
self.assertEquals(dfr["A15"].iloc[0], 1900)
self.assertEquals(dfr["A7"].iloc[1], 500)
- self.assertEquals(dfr["A15"].iloc[18], 1800)
+ self.assertEquals(dfr["A7"].iloc[11], 1400)
def test_inpower_get_load_data(self):
"""Test InPower.get_load_data()"""
- load_data = InPower().get_load_data({0: "A7", 1: "A15"})
+ load_data = InPower().get_load_data(self.map_label)
- self.assertEquals(load_data["A15"].iloc[0], 2 + 6 + 0 + 1)
- self.assertEquals(load_data["A7"].iloc[3], 9 + 7 + 20 + 2)
+ self.assertEquals(load_data["A15"].iloc[0], 5 + 3 + 0 + 2)
+ self.assertEquals(load_data["A7"].iloc[3], 20 + 37 + 7 + 25)
self.assertEquals(load_data["A15"].iloc[0], load_data["A15"].iloc[1])
def test_inpower_plot_load(self):
"""Test that InPower.plot_load() doesn't explode"""
- InPower().plot_load({0: "A7", 1: "A15"}, title="Util")
+ InPower().plot_load(self.map_label, title="Util")
diff --git a/tests/test_thermal.py b/tests/test_thermal.py
index 100ed57..f752fa8 100644
--- a/tests/test_thermal.py
+++ b/tests/test_thermal.py
@@ -21,7 +21,7 @@
df = Thermal().get_data_frame()
self.assertTrue("thermal_zone" in df.columns)
- self.assertEquals(df["temp"].iloc[0], 45000)
+ self.assertEquals(df["temp"].iloc[0], 44000)
def test_post__plot_setup(self):
"""Test that post_plot_setup() doesn't bomb"""
@@ -64,7 +64,7 @@
def test_get_thermal_csv(self):
ThermalGovernor().write_thermal_csv()
- first_data_line = '1094.696946,0,112,12,124,2718,5036,756,8510,8511,8511,48000,9000\n'
+ first_data_line = '666.731837,3,124,10,137,2718,5036,755,8509,8511,8511,48000,9000\n'
with open("thermal.csv") as f:
first_line = f.readline()
diff --git a/tests/trace.dat b/tests/trace.dat
index 3ea303c..40acbc1 100644
--- a/tests/trace.dat
+++ b/tests/trace.dat
Binary files differ