Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 18, 2023
1 parent 45ac4b5 commit ae90124
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ RUN ID: 2023-08-17T13:29:29.969779
The application has run been run 7 times. Throught its runtime, it has used 3.128 kWh, released a total of 1.307 kgCO2e into the atmosphere, and you paid 1.02 € in electricity for it.
```

Perun will keep track of the energy of your application over multiple runs.
Perun will keep track of the energy of your application over multiple runs.

### Function Monitoring

Using a function decorator, information can be calculated about the runtime, power draw and component utilization while the function is executing.
Using a function decorator, information can be calculated about the runtime, power draw and component utilization while the function is executing.

```python

Expand All @@ -90,7 +90,7 @@ def main(n: int):
time.sleep(n)
```

After running the script with ```perun monitor```, the text report will add information about the monitored functions.
After running the script with ```perun monitor```, the text report will add information about the monitored functions.

```text
Monitored Functions
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Once your code finishes running, you will find a new directory called ``perun_re

The the text report summarizes the data gathered throught the application run by individual host, and averaging power consumption of the full runtime. Perun also makes all the raw data gathered from the hardware on an HDF5 file that is located on the same results folder. To explore the data manually, we recommend the Visual Studio Code extension `H5Web <https://marketplace.visualstudio.com/items?itemName=h5web.vscode-h5web>`_, to process it with python using `h5py <https://www.h5py.org/>`_, or to export using the :code:`perun export` subcommand (see :ref:`usage`).

The hdf5 file collects information over multiple runs of the application, adding a new section every time the application is executed using perun. The simplifies studying the behaviour of the application over time, make the last line in the summary report posible.
The hdf5 file collects information over multiple runs of the application, adding a new section every time the application is executed using perun. The simplifies studying the behaviour of the application over time, make the last line in the summary report posible.

Function Monitoring
-------------------
Expand All @@ -64,7 +64,7 @@ To get information the power consumption, runtime and hardware utilization of in
This will add a new section to the text report and to the hdf5 file with the individual function profiles.

.. code-block::
Monitored Functions
| Round # | Function | Avg Calls / Rank | Avg Runtime | Avg Power | Avg CPU Util | Avg GPU Mem Util |
Expand Down
9 changes: 3 additions & 6 deletions perun/io/text_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,14 @@ def textReport(dataNode: DataNode, mr_id: str) -> str:
if metric_type in host_node.metrics:
m = host_node.metrics[metric_type]
entry[metric_type.name] = value2ValueUnitStr(m.value, m.metric_md)

host_device_rows.append(entry)
entry = {
"Round #": run_number,
"Host": "All"
}
entry = {"Round #": run_number, "Host": "All"}
for metric_type in tableMetrics:
if metric_type in run_node.metrics:
m = run_node.metrics[metric_type]
entry[metric_type.name] = value2ValueUnitStr(m.value, m.metric_md)

host_device_rows.append(entry)

mr_table = pd.DataFrame.from_records(host_device_rows)
Expand Down

0 comments on commit ae90124

Please sign in to comment.