Powerlog
A command-line tool that measures the CPU and GPU energy consumed by an unmodified program.
Install
pip install powerlog
Python 3.8 or newer, no Python dependencies. Power sources are detected at
runtime: NVIDIA (NVML), AMD (ROCm SMI or amdgpu sysfs), Intel (Level Zero) and
CPU RAPL on Linux. Anything unavailable is reported as n/a rather than failing
the run.
Use
powerlog ./my_program --arg value
================================================================
POWERLOG ENERGY SUMMARY
================================================================
Command ./my_program --arg value
Runtime (s) 12.4180
CPU AMD EPYC 7532 32-Core Processor
GPU NVIDIA A100-PCIE-40GB
----------------------------------------------------------------
Domain Energy (J) Share (%) Avg Power (W)
----------------------------------------------------------------
CPU 962.4013 31.06 77.5013
GPU 2136.7742 68.94 172.0700
----------------------------------------------------------------
TOTAL 3099.1755
EDP (J*s) 38485.5262
----------------------------------------------------------------
Samples 124
CPU source CPU package (RAPL powercap sysfs), 2 package domain(s)
GPU source NVIDIA GPU (nvidia-smi / NVML), 1 device(s)
================================================================
Powerlog runs unmodified binaries and samples CPU and GPU power in lockstep, so the measurement covers the whole application — I/O, transfers, kernel launches, synchronization — not just the kernels. It writes a summary CSV and a power trace, and exits with the program's own status.
Check what your machine exposes with powerlog --list-backends.
Documentation
Everything else is at powerlog.readthedocs.io:
Installation · Quick Start · CLI Reference · Example Applications · Backends · Methodology · Output Files · Python API
This repository additionally carries two things the wheel does not: example GPU
programs in apps/, and
datalog-engine-comparison/, a study comparing
the energy behaviour of five GPU-accelerated Datalog engines.
Contributing
Bug reports and patches are welcome on the
issue tracker. Open an issue first
for anything substantial, then send a pull request against main. Release
history is in Changelog.md.
License
MIT. See LICENSE.
Citation
@inproceedings{shovon2026heterogeneous,
title={Heterogeneous Energy Characterization of GPU-Powered Datalog Engines},
author={Shovon, Ahmedur Rahman and Sun, Yihao and Lan, Zhiling and Perarnau, Swann and Gilray, Thomas and Micinski, Kristopher and Papka, Michael E and Kumar, Sidharth},
booktitle={2026 IEEE/ACM Workshop on Energy Efficiency with Sustainable Performance: Techniques, Tools, and Best Practices (EESP)},
year={2026},
organization={IEEE}
}
Metadata
Release files for powerlog 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| powerlog-0.1.1.tar.gz | 40.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| powerlog-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.0 kB
Release files / powerlog-0.1.1.tar.gz
| Download URL | powerlog-0.1.1.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
459d8a398a3bba72a4979a41a3f747c9d22f447c5201247fb30d90bda5750bdf
|
|
BLAKE2b-256 checksum How to use checksums |
212f29d1625c707afca8af9b911bf898bd3a61e2c63a387335b44c7085bb540d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / powerlog-0.1.1-py3-none-any.whl
| Download URL | powerlog-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1a9f8bfaff11df3c559304c288668220e8c7c083fc683b4edbdec180d3bf13d
|
|
BLAKE2b-256 checksum How to use checksums |
3f5612c4f096f3a7e94a6b605132bf701ccecf7343eac798f63bfb855971de66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|