Skip to content

Commit 0758c4d

Browse files
Update example Energibridge run_data population.
All the energy related columns of the energibridge output represent cumulative values that RAPL, for example, publishes. Because of that, in order to save the total energy consumed by all parts of the system during the run we need to take the difference between the last and first values in each column.
1 parent b10c9b9 commit 0758c4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/energibridge-profiling/RunnerConfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ def populate_run_data(self, context: RunnerContext) -> Optional[Dict[str, Any]]:
123123
# energibridge.csv - Power consumption of the whole system
124124
df = pd.read_csv(context.run_dir / f"energibridge.csv")
125125
run_data = {
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),
126+
'dram_energy': round(df['DRAM_ENERGY (J)'].iloc[-1] - df['DRAM_ENERGY (J)'].iloc[0], 3),
127+
'package_energy': round(df['PACKAGE_ENERGY (J)'].iloc[-1] - df['PACKAGE_ENERGY (J)'].iloc[0], 3),
128+
'pp0_energy': round(df['PP0_ENERGY (J)'].iloc[-1] - df['PP0_ENERGY (J)'].iloc[0], 3),
129+
'pp1_energy': round(df['PP1_ENERGY (J)'].iloc[-1] - df['PP1_ENERGY (J)'].iloc[0], 3),
130130
}
131131
return run_data
132132

0 commit comments

Comments
 (0)