Skip to content

Dev mode #637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 1, 2024
Merged

Dev mode #637

merged 10 commits into from
Jan 1, 2024

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Dec 28, 2023

This PR introduces parts of the dev-mode and the healthcheck as mentioned in PR #556 with @davidkopp

Following new flags have been introduced:
--dev-no-sleeps - Skips all sleeps.
--dev-no-build - Skips building of the docker containers. This replaces and extends --dry-run
--dev-no-metrics - Does not import and run the metric providers

Skipping sleeps can lead to containers not being fully booted. This is why the healthcheck was implemented along with the long syntax of depends_on as discussed in #423

All of the flags have also been employed in the test cases. Expecting a decrease from ~12 minutes to ~3 minutes

@ArneTR ArneTR requested a review from ribalba December 28, 2023 09:42
Copy link

github-actions bot commented Dec 28, 2023

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 19.6193 1094.83 3.28776 341
Measurement #1 19.88 1094.83 3.28776 335

📈 Energy graph:

 
 7.78 ┤                                                   ╭╮                   ╭╮
 7.18 ┤                                                   ││                   ││
 6.58 ┤                                                   │╰╮              ╭╮  ││
 5.97 ┤                                                   │ │             ╭╯│  │╰╮╭╮
 5.37 ┤            ╭╮                                     │ │            ╭╯ ╰╮ │ ╰╯│
 4.77 ┤            │╰╮                                    │ │  ╭─╮╭╮     │   ╰╮│   │                ╭╮
 4.17 ┤           ╭╯ │   ╭───╮ ╭╮      ╭─╮   ╭╮╭╮         │ ╰──╯ ╰╯╰╮    │    ╰╯   │         ╭╮ ╭╮  ││   ╭╮                              ╭─────╮                              ╭╮                                       ╭╮     ╭╮                                ╭╮                                                   ╭╮                           ╭
 3.57 ┤      ╭╮╭──╯  ╰───╯   ╰─╯╰────╮ │ ╰───╯││╰╮ ╭╮    ╭╯         │   ╭╯         │       ╭─╯│╭╯╰─╮││ ╭─╯╰─────────────────────────╮╭───╯     ╰────╮╭╮                    ╭──╯╰─────╮╭────────────────────────────────╯╰─────╯╰─╮         ╭─╮         ╭╮ ╭───╮╭╯╰╮╭─╮╭───╮╭───╮ ╭──╮╭────╮╭────╮╭╮╭─╮╭─╮╭───╮╭──────╯╰─╮         ╭─╮         ╭╮ ╭╯
 2.97 ┤      │││                     │╭╯      ╰╯ │ ││ ╭─╮│          │   │          │       │  ││   │││╭╯                            ││              │││                   ╭╯         ╰╯                                          │         │ │╭╮       │╰╮│   ││  ╰╯ ││   ││   │╭╯  ╰╯    ││    ╰╯││ ╰╯ ││   ╰╯         │         │ ╰╮        ││ │
 2.37 ┤    ╭╮│││                     ╰╯          ╰╮││ │ ╰╯          ╰╮ ╭╯          │       │  ╰╯   ││││                             ││              ╰╯│                   │                                                      │         │ │││       │ ││   ││     ││   ││   ╰╯         ││      ││    ││              │       ╭╮│  │        ││ │
 1.77 ┼────╯╰╯╰╯                                  ╰╯╰─╯              ╰─╯           ╰───────╯       ╰╯╰╯                             ╰╯                ╰───────────────────╯                                                      ╰─────────╯ ╰╯╰───────╯ ╰╯   ╰╯     ╰╯   ╰╯              ╰╯      ╰╯    ╰╯              ╰───────╯╰╯  ╰────────╯╰─╯
                                                                                                                                                                      Watts over time

@ArneTR
Copy link
Member Author

ArneTR commented Dec 28, 2023

Sadly not quite the improvement as seen locally :(. The tests now take 6 minutes instead of 12. But at least 2x :)

Copy link

github-actions bot commented Dec 28, 2023

Old Energy Estimation

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 20.799 1008.57 3.37313 306
Measurement #1 21.0771 1008.57 3.37313 301

📈 Energy graph:

 
 7.82 ┤                                       ╭╮
 7.21 ┤                                       ││
 6.61 ┤                                       │╰╮           ╭╮  ╭─╮
 6.00 ┤                                       │ │           ││  │ │╭╮
 5.40 ┤        ╭╮                             │ │          ╭╯╰╮ │ ╰╯│
 4.79 ┤        │╰╮                            │ │╭╮╭─╮╭╮  ╭╯  ╰╮│   │              ╭╮
 4.19 ┤      ╭─╯ │   ╭───╮ ╭╮   ╭╮   ╭──╮     │ ╰╯╰╯ ╰╯│  │    ╰╯   │        ╭╮ ╭╮ ││╭╮╭╮                            ╭────╮                                                                      ╭╮    ╭╮                                                                          ╭─╮
 3.58 ┤     ╭╯   ╰───╯   ╰─╯╰───╯╰───╯  ╰──╮╭─╯        ╰╮ │         │        │╰─╯╰─╯╰╯╰╯╰────────────────────────────╯    ╰─────╮                     ╭─────────╮╭───────────────────────────────╯╰────╯╰─╮        ╭─╮╭╮        ╭╮ ╭──────────────────────────────────────────╮╭───╯ ╰─╮        ╭─╮         ╭╮ ╭─
 2.98 ┤    ╭╯                              ││           │ │         │        │                                                  ╰╮                    │         ││                                        │        │ │││        ││ │                                          ││       │        │ │         ││ │
 2.37 ┤    │                               ││           │ │         │       ╭╯                                                   │                   ╭╯         ╰╯                                        │        │ ╰╯│        ││ │                                          ╰╯       │        │ │╭╮       │╰╮│
 1.77 ┼────╯                               ╰╯           ╰─╯         ╰───────╯                                                    ╰───────────────────╯                                                    ╰────────╯   ╰────────╯╰─╯                                                   ╰────────╯ ╰╯╰───────╯ ╰╯
                                                                                                                                                     Watts over time

Copy link
Member

@ribalba ribalba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't go through all the tests but next to my little comment looks good to me

parser.add_argument('--dry-run', action='store_true', help='Removes all sleeps. Resulting measurement data will be skewed.')
parser.add_argument('--dev-repeat-run', action='store_true', help='Checks if a docker image is already in the local cache and will then not build it. Also doesn\'t clear the images after a run')
parser.add_argument('--dev-no-metrics', action='store_true', help='Skips loading the metric providers. Runs will be faster, but you will have no metric')
parser.add_argument('--dev-no-sleeps', action='store_true', help='Removes all sleeps. Resulting measurement data will be skewed.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could also take in a sleep value so you can set it to 1 second and such mitigate some of the errors. It defaults to 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a nice idea, but the sleeps quickly balloon up even if you only set a 1 to this.

Having no-sleeps and using the healthcheck is actually a breeze and I am fixing the Nextcloud containers atm and it works very well.

Let's reconsider this once we run into issues with the 0-sleep implementation

ArneTR added 4 commits January 1, 2024 11:23
* main:
  Adds skip_checks to providers (#566)
  Bump pytest from 7.4.3 to 7.4.4 (#639)
  Disabled second PSU provider for VM tests
  System check providers running (#619)
  Stderr is now by default UTF-8 (#624)
  Refactored kill/killpg mechanism to be unified and actually fail on n… (#625)
  Command fix. Must be list append
  Refactorings
  Moved tinyproxy out of if clause
  Refactoring for error messages and security fix for path echoing (#636)
Copy link

github-actions bot commented Jan 1, 2024

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 20.972 1060.45 3.39886 320
Measurement #1 21.2291 1060.45 3.39886 314

📈 Energy graph:

 
 7.86 ┤                                              ╭╮
 7.25 ┤                                              ││                 ╭╮
 6.64 ┤                                              ││                 ││╭╮
 6.03 ┤                                              ││            ╭╮  ╭╯│││
 5.42 ┤                                             ╭╯│          ╭─╯╰╮ │ │││
 4.81 ┤                                             │ ╰╮ ╭─╮╭─╮  │   ╰╮│ ╰╯│               ╭╮
 4.21 ┤     ╭─╮  ╭─╮ ╭╮   ╭╮╭╮  ╭╮       ╭╮ ╭╮      │  │╭╯ ╰╯ │  │    ╰╯   │         ╭╮╭╮  ││╭╮╭╮ ╭╮                             ╭────╮                                                         ╭╮                  ╭╮                                                      ╭╮     ╭╮   ╭╮      ╭─╮                          ╭
 3.60 ┤    ╭╯ ╰──╯ ╰─╯╰───╯╰╯╰──╯╰───────╯╰─╯╰───╮╭─╯  ╰╯     ╰╮ │         │        ╭╯││╰──╯╰╯╰╯╰─╯╰────────────────────────╮╭───╯    ╰──────╮                   ╭──────────╮╭──────────────────╯╰──────────────────╯╰─╮         ╭╮╭╮        ╭╮╭────────────────────────────╯╰─────╯╰───╯╰──────╯ ╰─╮        ╭─╮         ╭╮ ╭╯
 2.99 ┤    │                                     ││            │ │         ╰╮       │ ││                                    ╰╯               │                   │          ╰╯                                         │        ╭╯│││       ╭╯││                                                    │        │ │         ││ │
 2.38 ┤    │                                     ││            │╭╯          │       │ ╰╯                                                     │                   │                                                     │        │ │││       │ ││                                                    │        │ ╰╮        ││ │
 1.77 ┼────╯                                     ╰╯            ╰╯           ╰───────╯                                                        ╰───────────────────╯                                                     ╰────────╯ ╰╯╰───────╯ ╰╯                                                    ╰────────╯  ╰────────╯╰─╯
                                                                                                                                                           Watts over time

@ArneTR ArneTR merged commit 807cdd4 into main Jan 1, 2024
@ArneTR ArneTR deleted the dev-mode branch January 1, 2024 11:47
ArneTR added a commit that referenced this pull request Jan 1, 2024
* main:
  Dev mode (#637)
  Hotfix: resolutions -> resolution
  Adds skip_checks to providers (#566)
  Bump pytest from 7.4.3 to 7.4.4 (#639)
  Disabled second PSU provider for VM tests
  System check providers running (#619)
  Stderr is now by default UTF-8 (#624)
  Refactored kill/killpg mechanism to be unified and actually fail on n… (#625)
  Command fix. Must be list append
  Refactorings
  Moved tinyproxy out of if clause
  Refactoring for error messages and security fix for path echoing (#636)
ArneTR added a commit that referenced this pull request Jan 2, 2024
* main:
  Dev mode (#637)
  Hotfix: resolutions -> resolution
  Adds skip_checks to providers (#566)
  Bump pytest from 7.4.3 to 7.4.4 (#639)
  Disabled second PSU provider for VM tests
  System check providers running (#619)
  Stderr is now by default UTF-8 (#624)
  Refactored kill/killpg mechanism to be unified and actually fail on n… (#625)
  Command fix. Must be list append
  Refactorings
  Moved tinyproxy out of if clause
  Refactoring for error messages and security fix for path echoing (#636)
  GMT color via own commit hash (#634)
  Hotfix for branch not main
  Non-Blocking starlette body read (#633)
  Bump fastapi from 0.105.0 to 0.108.0 (#632)
  Updated XGBoost submodule
  Bump pydantic from 2.5.2 to 2.5.3 (#628)
  Added stddev to timeline (#627)
@ribalba
Copy link
Member

ribalba commented Jan 2, 2024

@ArneTR is there also a PR to update the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants