--track-energy feature#125
Conversation
| raise ValueError("duplicated benchmark name: %r" % task.name) | ||
| self._bench_names.add(task.name) | ||
|
|
||
There was a problem hiding this comment.
Unnecessary spaces in an empty line.
|
|
What is LIBREADEN? Where does it come from? Please write documentation. |
I am sorry, this is my first open-source contribution ever. I tried to be instructive in this PR's initial text. What qualifies as 'documentation' exactly? Do you mean editing the repo's README? Something else? |
|
@cappadokes |
OK, I will do my best to expand below. It would be great if you could then direct me on what specific places of this repo other than our thread here this information should exist. The present PR introduces the implementation of a simple energy consumption benchmarking feature. It was developed and tested on an Intel(R) Core(TM) i7-8750H x86_64 Linux machine for Requirements
Usage export ENFILE= # Absolute path to energy_uj or equivalent resource
export LIBREADEN= # Absolute path to pyperf/pyperf/dummy_c_library.so
python3 pyperf_using_benchmark.py --track-energy --inherit-environ ENFILE,LIBREADENMotivation First experiences Limitation |
|
The documentation source lives in the doc/ subdirectory and is rendered at: https://pyperf.readthedocs.io/ |
And should I directly edit the .rst files in doc/ ? Are they a result of some automatic docs generation utility (and thus require that I edit the |
|
Hi all. I have now updated the documentation so as to include There is nothing more to be done at this point. |
corona10
left a comment
There was a problem hiding this comment.
@cappadokes Sorry for the delay, I will take a look at this PR ASAP
cc @vstinner
|
@cappadokes Hi, was this (and python/pyperformance#140) intentionally closed? |
Python is popular, even on resource-constrained devices. Energy is important. A nice-to-have feature would be a
pyperfoption that, if enabled, measures energy consumption instead of execution time. The only requirement for this pull request to bear meaning is the availability of some always-increasing measurement of the total energy spent by a device component. An example is the interface exposed by Intel's RAPL, which was used as the environment for this pull request.Instructions for utilizing the
--track-energyoption are:libreaden.so, the corresponding source file beingread_file.c). Save the library inpyperf/pyperf.LIBREADEN, containing the path to the C library.ENFILE, containing the path to the energy measurement file.pyperfscript with--track-energyand--inherit-environ LIBREADEN,ENFILE.Measurements saved will now be energy instead of execution time.