Skip to content

Commit ed7a988

Browse files
author
benoit-cty
committed
build doc
1 parent 7c482a4 commit ed7a988

23 files changed

Lines changed: 156 additions & 43 deletions

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 53c61bd4c1857c7af88007809bfc8089
3+
config: 17ecbb66283862d6a160c35238add531
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_sources/usage.rst.txt

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,67 @@ The command line could also works without internet by providing the country code
6666
6767
codecarbon monitor --offline --country-iso-code FRA
6868
69-
Implementing CodeCarbon in your code allows you to track the emissions of a specific block of code.
69+
70+
Running Any Command with CodeCarbon
71+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72+
73+
If you want to track emissions while running any command or program (not just Python scripts), you can use the ``codecarbon monitor --`` command.
74+
This allows non-Python users to measure machine emissions during the execution of any command:
75+
76+
.. code-block:: console
77+
78+
codecarbon monitor -- <your_command>
79+
80+
Do not surround ``<your_command>`` with quotes. The double hyphen ``--`` indicates the end of CodeCarbon options and the beginning of the command to run.
81+
82+
**Examples:**
83+
84+
.. code-block:: console
85+
86+
# Run a shell script
87+
codecarbon monitor -- ./benchmark.sh
88+
89+
# Run a command with arguments (use quotes for special characters)
90+
codecarbon monitor -- bash -c 'echo "Processing..."; sleep 30; echo "Done!"'
91+
92+
# Run Python scripts
93+
codecarbon monitor -- python train_model.py
94+
95+
# Run Node.js applications
96+
codecarbon monitor -- node app.js
97+
98+
# Run tests with output redirection
99+
codecarbon monitor -- npm run test > output.txt
100+
101+
# Display the CodeCarbon detailed logs
102+
codecarbon monitor --log-level debug -- python --version
103+
104+
**Output:**
105+
106+
When the command completes, CodeCarbon displays a summary report and saves the emissions data to a CSV file:
107+
108+
.. code-block:: console
109+
110+
🌱 CodeCarbon: Starting emissions tracking...
111+
Command: bash -c echo "Processing..."; sleep 30; echo "Done!"
112+
113+
Processing...
114+
Done!
115+
116+
============================================================
117+
🌱 CodeCarbon Emissions Report
118+
============================================================
119+
Command: bash -c echo "Processing..."; sleep 30; echo "Done!"
120+
Emissions: 0.0317 g CO2eq
121+
Saved to: /home/user/emissions.csv
122+
⚠️ Note: Measured entire machine (includes all system processes)
123+
============================================================
124+
125+
.. note::
126+
The ``codecarbon monitor --`` command tracks process-level emissions (only the specific command), not the
127+
entire machine. For machine-level tracking, use the ``codecarbon monitor`` command.
128+
129+
For more fine-grained tracking, implementing CodeCarbon in your code allows you to track the emissions of a specific block of code.
70130

71131
Explicit Object
72132
~~~~~~~~~~~~~~~

docs/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '3.2.2',
2+
VERSION: '3.2.3',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

docs/advanced_installation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>Advanced Installation &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>Advanced Installation &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

docs/api.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>CodeCarbon API &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>CodeCarbon API &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

docs/comet.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>Comet Integration &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>Comet Integration &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

docs/examples.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>Examples &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>Examples &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

docs/faq.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>Frequently Asked Questions &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>Frequently Asked Questions &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

docs/genindex.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<head>
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>Index &mdash; CodeCarbon 3.2.2 documentation</title>
8+
<title>Index &mdash; CodeCarbon 3.2.3 documentation</title>
99
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1010
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1111

1212

1313
<script src="_static/jquery.js?v=5d32c60e"></script>
1414
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
15-
<script src="_static/documentation_options.js?v=dcedd534"></script>
15+
<script src="_static/documentation_options.js?v=7895512d"></script>
1616
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1717
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1818
<script src="_static/js/theme.js"></script>

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>CodeCarbon &mdash; CodeCarbon 3.2.2 documentation</title>
9+
<title>CodeCarbon &mdash; CodeCarbon 3.2.3 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
1212

1313

1414
<script src="_static/jquery.js?v=5d32c60e"></script>
1515
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
16-
<script src="_static/documentation_options.js?v=dcedd534"></script>
16+
<script src="_static/documentation_options.js?v=7895512d"></script>
1717
<script src="_static/doctools.js?v=fd6eb6e6"></script>
1818
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
1919
<script src="_static/js/theme.js"></script>

0 commit comments

Comments
 (0)