Build from Source
You can build the profiler from the sources by cloning the repository. It can be useful if you want to access the latest features not yet released, compile Joule Profiler with only a subset of features, or if you intend to customize the source code.
# Clone the repository
git clone https://github.com/joule-profiler/joule-profiler.git
cd joule-profiler
# Build and install system-wide
cargo build --release
cp target/release/joule-profiler /usr/local/bin/
# Verify installation
joule-profiler --version
Tip
System-wide installation (
/usr/local/bin/) is recommended as the tool may require root privileges to use some features (e.g., cgroup, RAPL Powercap).
Note
By default, Joule Profiler is compiled with all the sources and features, if you want to filter which sources to compile the profiler with, use
--no-default-featuresand--featurescargo flags:# Compile only the RAPL and perf_event sources cargo build --release --no-default-features --features rapl-perf,perf
A source is usually featured with its name, except for RAPL where you have to suffix with the backend. But if you’re struggling to activate one, check the different features in the Cargo.toml file.