Skip to content
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

chore: Avoid unnecessary k8s::Client creations #295

Merged
merged 5 commits into from
May 28, 2024

Conversation

sbernauer
Copy link
Member

@sbernauer sbernauer commented May 27, 2024

Description

Needs #294 to properly work

Shows a significant speedup (e.g. when installing to IONOS) from 13s to 7.6s, the speedup is probably much higher on mobile networks (ask me after my next trip to Hamburg ^^)

➜  demos git:(observability-stack) ✗ time ~/stackable/stackable-cockpit/target/debug/stackablectl demo in end-to-end-security
   WARN  RUNNING DISCOVERY
    at rust/stackable-cockpit/src/utils/k8s/client.rs:80


Installed demo 'end-to-end-security'

Use "stackablectl operator installed" to display the installed operators.
Use "stackablectl stacklet list" to display the installed stacklets.
~/stackable/stackable-cockpit/target/debug/stackablectl demo in   2,72s user 0,55s system 43% cpu 7,430 total
➜  demos git:(observability-stack) ✗ time stackablectl demo in end-to-end-security          

Installed demo 'end-to-end-security'

Use "stackablectl operator installed" to display the installed operators.
Use "stackablectl stacklet list" to display the installed stacklets.
stackablectl demo in end-to-end-security  2,77s user 0,63s system 24% cpu 13,635 total
➜  demos git:(observability-stack) ✗ time ~/stackable/stackable-cockpit/target/debug/stackablectl demo in end-to-end-security
   WARN  RUNNING DISCOVERY
    at rust/stackable-cockpit/src/utils/k8s/client.rs:80


Installed demo 'end-to-end-security'

Use "stackablectl operator installed" to display the installed operators.
Use "stackablectl stacklet list" to display the installed stacklets.
~/stackable/stackable-cockpit/target/debug/stackablectl demo in   2,67s user 0,56s system 41% cpu 7,837 total
➜  demos git:(observability-stack) ✗ time stackablectl demo in end-to-end-security                                           

Installed demo 'end-to-end-security'

Use "stackablectl operator installed" to display the installed operators.
Use "stackablectl stacklet list" to display the installed stacklets.
stackablectl demo in end-to-end-security  2,73s user 0,61s system 27% cpu 12,115 total

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

NickLarsenNZ
NickLarsenNZ previously approved these changes May 27, 2024
rust/stackable-cockpitd/src/handlers/stacklets.rs Outdated Show resolved Hide resolved
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@sbernauer sbernauer added this pull request to the merge queue May 28, 2024
Merged via the queue into main with commit 5e8d4d8 May 28, 2024
39 checks passed
@sbernauer sbernauer deleted the chore/avoid-client-creation branch May 28, 2024 07:47
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