8000 Add energy measurements support by cappadokes · Pull Request #140 · python/pyperformance · GitHub
[go: up one dir, main page]

Skip to content

Add energy measurements support #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Energy readings in progress
  • Loading branch information
Christos P. Lamprakos committed Mar 1, 2022
commit 4e4fa68b51f3ba44e895717abe74a262c3488162
2 changes: 2 additions & 0 deletions pyperformance/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def parse_args():
cmd.add_argument("--append", metavar="FILENAME",
help="Add runs to an existing file, or create it "
"if it doesn't exist")
cmd.add_argument("--track-energy", action="store_true",
help="Track energy instead of wall clock time.")
filter_opts(cmd)

# show
Expand Down
2 changes: 2 additions & 0 deletions pyperformance/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,7 @@ def get_pyperf_opts(options):
opts.append('--track-memory')
if options.inherit_environ:
opts.append('--inherit-environ=%s' % ','.join(options.inherit_environ))
if options.track_energy:
opts.append('--track-energy')

return opts
0