Open mkbane opened 1 year ago
Hello,
We do not support this.
What you can do is run codecarbon monitor
then run a.out
in another terminal. Then manually stop codecarbon with Ctrl + C
when you program end.
Sorry not very handy !
Or you could write a Python script that run a.out
and use the codecarbon tracker in the script.
@benoit-cty would you accept a PR for this? I think we should implement a command codecarbon monitor [COMMAND...]
where:
codecarbon monitor
is ran without positional arguments, monitor machine until CTRL-C (current behavior)codecarbon monitor
has positional arguments, call subprocess.run(...)
and measure that
Description
I wish to use codecarbon to give me the energy consumed by my CPU for running a command eg "a.out", so wanted to do something like
codecarbon ./a.out
and get a figure e.g. of Joules of kWh.
How do I do this? I cannot see it within the documentation