Closed rouvoy closed 4 years ago
What about providing an API like this:
import pyRAPL rapl = pyRAPL.PyRAPL() record = rapl.record(pyRAPL.PKG|pyRAPL.DRAM) foo() bar() record.stop() pkg_energy = record.energy(pyRAPL.PKG) dram_energy = record.energy(pyRAPL.DRAM)
with the supported masks: pyRAPL.PKG, pyRAPL.DRAM, pyRAPL.GPU, pyRAPL.ALL
pyRAPL.PKG
pyRAPL.DRAM
pyRAPL.GPU
pyRAPL.ALL
This can be the basis for being included in a ContextManager and/or code annotation.
ContextManager
ok maybe using a list of constant instead of bitwise operation ?
ok, the most important thing is to keep it simple and compact.
What about providing an API like this:
with the supported masks:
pyRAPL.PKG
,pyRAPL.DRAM
,pyRAPL.GPU
,pyRAPL.ALL
This can be the basis for being included in a
ContextManager
and/or code annotation.