green-coding-solutions / green-metrics-tool

Measure energy and carbon consumption of software
https://metrics.green-coding.io
GNU Affero General Public License v3.0
143 stars 19 forks source link

Normalized -i switch to always be ms #733

Closed ArneTR closed 3 months ago

ArneTR commented 3 months ago

Some reporters where using -i 0.1 to sleep for 100 ms and some -i 100 to sleep for 100 ms

This is now normalized.

The initial design decision was to to the least amount possible in the reporters in terms of conversion when collecting data. However we could not measure any difference in energy or time when using the non-conversion approach. So we opted for better consistency.

ArneTR commented 3 months ago

@ribalba Can you give it a quick look? Should be all fine though. IPMI I could not test, since we have no machine atm.

github-actions[bot] commented 3 months ago
Eco-CI Output: Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 22.6087 1406.7 3.51675 407
Measurement #1 22.8862 1406.7 3.51675 401

📈 Energy graph:


 8.18 ┤                                                                                                                                  ╭──╮
 7.54 ┤                                                                                                                                  │  │
 6.90 ┤                                                                                                               ╭╮                 │  ╰╮
 6.26 ┤                                                                                                               ││           ╭╮  ╭╮│   │
 5.62 ┤                                                                                                               ││          ╭╯╰╮ │││   │
 4.97 ┤                                                                                                               ││  ╭╮     ╭╯  │ │╰╯   │
 4.33 ┤           ╭───╮    ╭╮                                           ╭─╮ ╭╮                             ╭╮         │╰──╯╰──╮  │   ╰─╯     │      ╭╮        ╭╮                                                                                                            ╭╮    ╭╮   ╭╮    ╭╮   ╭╮    ╭╮         ╭╮                                                                                               ╭╮
 3.69 ┤         ╭─╯   ╰╮   │╰──────╮ ╭───────────────────────╮ ╭────────╯ ╰─╯╰╮  ╭─────────────────────────╯╰─────────╯       │  │           │     ╭╯╰──╮╭───╮││╭─────────────────────────────────╮╭──────────────╮                      ╭──────────╮╭──────────────────────╯╰────╯╰───╯╰────╯╰───╯╰────╯╰─────────╯╰──────────╮  ╭─╮╭─╮╭───╮╭─╮╭─╮╭╮╭─╮ ╭──╮ ╭───╮╭─╮╭─╮╭─╮╭─╮╭─╮╭───────╮         ╭╮          ╭╮╭─╯╰
 3.05 ┼╮      ╭╮│      │  ╭╯       ╰╮│                       │ │              ╰╮ │                                            ╰╮╭╯           │     │    ││   ││││                                 ││              ╰╮                     │          ╰╯                                                                         │ ╭╯ ╰╯ ││   ││ ╰╯ ││││ │╭╯  │╭╯   ╰╯ ││ ││ ││ ││ ││       │         ││         ╭╯││
 2.41 ┤│     ╭╯╰╯      │  │         ││                       │ │               │ │                                             ╰╯            │    ╭╯    ╰╯   ││││                                 ││               ╰╮                    │                                                                                     │ │     ││   ││    ││╰╯ ││   ╰╯       ╰╯ ╰╯ ││ ╰╯ ││       │         │╰─╮       │ ││
 1.77 ┤╰─────╯         ╰──╯         ╰╯                       ╰─╯               ╰─╯                                                           ╰────╯          ╰╯╰╯                                 ╰╯                ╰────────────────────╯                                                                                     ╰─╯     ╰╯   ╰╯    ╰╯   ╰╯                  ╰╯    ╰╯       ╰─────────╯  ╰───────╯ ╰╯
                                                                                                                                                                                                       Watts over time