@@ -61,7 +61,9 @@ def create_run_table_model(self) -> RunTableModel:
6161 sampling_factor = FactorModel ("sampling" , [10 , 50 , 100 , 200 , 500 , 1000 ])
6262 self .run_table_model = RunTableModel (
6363 factors = [sampling_factor ],
64- data_columns = ['avg_cpu_usage_0' , 'package_energy' ]
64+ data_columns = ['dram_energy' , 'package_energy' ,
65+ 'pp0_energy' , 'pp1_energy' ]
66+
6567 )
6668 return self .run_table_model
6769
@@ -79,17 +81,7 @@ def start_run(self, context: RunnerContext) -> None:
7981 """Perform any activity required for starting the run here.
8082 For example, starting the target system to measure.
8183 Activities after starting the run should also be performed here."""
82-
83- #cpu_limit = context.run_variation['cpu_limit']
84-
85- # start the target
86- #self.target = subprocess.Popen(['python', './primer.py'],
87- # stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.ROOT_DIR,
88- #)
89-
90- # Configure the environment based on the current variation
91- #subprocess.check_call(shlex.split(f'cpulimit -b -p {self.target.pid} --limit {cpu_limit}'))
92-
84+ pass
9385
9486 def start_measurement (self , context : RunnerContext ) -> None :
9587 """Perform any activity required for starting measurements."""
@@ -116,16 +108,11 @@ def interact(self, context: RunnerContext) -> None:
116108
117109 def stop_measurement (self , context : RunnerContext ) -> None :
118110 """Perform any activity here required for stopping measurements."""
119-
120- #os.kill(self.profiler.pid, signal.SIGINT) # graceful shutdown of energibridge
121111 self .profiler .wait ()
122112
123113 def stop_run (self , context : RunnerContext ) -> None :
124114 """Perform any activity here required for stopping the run.
125115 Activities after stopping the run should also be performed here."""
126-
127- #self.target.kill()
128- #self.target.wait()
129116 pass
130117
131118 def populate_run_data (self , context : RunnerContext ) -> Optional [Dict [str , Any ]]:
@@ -134,11 +121,12 @@ def populate_run_data(self, context: RunnerContext) -> Optional[Dict[str, Any]]:
134121 Returns a dictionary with keys `self.run_table_model.data_columns` and their values populated"""
135122
136123 # energibridge.csv - Power consumption of the whole system
137- # energibridge.csv-PID.csv - Power consumption of that specific process
138124 df = pd .read_csv (context .run_dir / f"energibridge.csv" )
139125 run_data = {
140- 'avg_cpu_usage_0' : round (df ['CPU_USAGE_0' ].sum (), 3 ),
141- 'package_energy' : round (df ['PACKAGE_ENERGY (J)' ].sum (), 3 ),
126+ 'dram_energy' : round (df ['DRAM_ENERGY (J)' ].sum (), 3 ),
127+ 'package_energy' : round (df ['PACKAGE_ENERGY (J)' ].sum (), 3 ),
128+ 'pp0_energy' : round (df ['PP0_ENERGY (J)' ].sum (), 3 ),
129+ 'pp1_energy' : round (df ['PP1_ENERGY (J)' ].sum (), 3 ),
142130 }
143131 return run_data
144132
0 commit comments