Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Module

The CLI Module is the straightforward entry point for users.

It parses command-line input and configure the profiler to be usable quickly and easily while providing several configuration options. The CLI acts as an adapter between the user, the core domain, and the sources. Because of this separation, the CLI can evolve independently from the core logic and sources.

Here’s a summary of all the CLI arguments:

ArgumentDefaultDescription
-v or --verboseERROR levelVerbosity level. Stack for more detail: -v, -vv, -vvv.
--output-formatterminalSpecify the output format in which to export the data. (Available: terminal, csv, json)
-o or --output-filedata<TIMESTAMP>.csv/jsonCustom output file path for CSV / JSON export.
--sourcesraplA comma-separated list of the activated sources. (e.g., rapl,perf,nvml)
-D or --defineOverride a configuration key, repeatable. (e.g., -D profiler.rapl_backend=powercap)
--configTOML configuration file. Every key it sets can also be set with -D.
commandNone (required)The program to execute and profile.

The subcommand profile has also some arguments:

ArgumentDefaultDescription
--token-pattern__[A-Z0-9_]+__Regex to detect phase tokens in the program’s stdout.
--stdout-fileNoneRedirect the profiled program’s stdout to a file.
--use-rootfalseExecutes the profiled command with root privileges if true and Joule Profiler is launched as root.
--init-timeout1sDuration before aborting sources initialization. (e.g., 1s, 10s, 1m)

The profiled command is provided after -- at the end of the arguments.