best practice of multiple energy measurements in a single program #74
-
I want to have multiple energy measurements. For example, I have a for loop, each time I need to get an energy consumption value for a function (maybe instantiated by different parameters). Shall I initiate a new ZeusMonitor before each measurement? |
Beta Was this translation helpful? Give feedback.
Answered by
jaywonchung
May 8, 2024
Replies: 1 comment
-
You only need one monitor for that. Multiple measurement windows can even overlap w.r.t. a single mes = []
for _ in range(10):
monitor.begin_window("loop")
fun()
mes.append(monitor.end_window("loop")) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sunt-ing
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
You only need one monitor for that. Multiple measurement windows can even overlap w.r.t. a single
ZeusMonitor
. That is, even when measurement windows temporally overlap, you will getMeasurement
objects as though those windows were taken from differentZeusMonitor
instances.