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

feat(sysctl): Add core module with profiler commands to sysctl #951

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

msbrogli
Copy link
Member

@msbrogli msbrogli commented Feb 9, 2024

Motivation

We currently must use an HTTP API to start and stop a global profiler. Such an API might not be accessible due to networking issues so having the ability to do it through sysctl becomes relevant.

Acceptance Criteria

  1. Create commands core.profiler.status, core.profiler.start, and core.profiler.stop in sysctl.
  2. Add HathorManagerSysctl which handles all these commands.
  3. Add HathorManager.is_profiler_running to keep track whether the profiler is running or not.
  4. Add HathorManager.profiler_last_start_time to be able to calculate how long the profiler has been running.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli requested a review from jansegre as a code owner February 9, 2024 19:45
@msbrogli msbrogli self-assigned this Feb 9, 2024
pedroferreira1
pedroferreira1 previously approved these changes Feb 9, 2024
hathor/manager.py Outdated Show resolved Hide resolved
hathor/sysctl/core/manager.py Show resolved Hide resolved
jansegre
jansegre previously approved these changes Feb 9, 2024
@msbrogli msbrogli dismissed stale reviews from jansegre and pedroferreira1 via d4e4c8e February 9, 2024 22:52
@msbrogli msbrogli force-pushed the feat/sysctl-profiler branch from 53d50e6 to d4e4c8e Compare February 9, 2024 22:52
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (f4d6a28) 85.34% compared to head (d4e4c8e) 85.35%.

❗ Current head d4e4c8e differs from pull request most recent head 1f68ec7. Consider uploading reports for the commit 1f68ec7 to get more accurate results

Files Patch % Lines
hathor/sysctl/core/manager.py 90.47% 1 Missing and 1 partial ⚠️
hathor/builder/sysctl_builder.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #951      +/-   ##
==========================================
+ Coverage   85.34%   85.35%   +0.01%     
==========================================
  Files         291      292       +1     
  Lines       22540    22568      +28     
  Branches     3393     3395       +2     
==========================================
+ Hits        19236    19263      +27     
- Misses       2630     2631       +1     
  Partials      674      674              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pedroferreira1 pedroferreira1 self-requested a review February 12, 2024 17:43
@msbrogli msbrogli force-pushed the feat/sysctl-profiler branch from d4e4c8e to 1f68ec7 Compare February 14, 2024 22:05
@msbrogli msbrogli merged commit 1f68ec7 into master Feb 14, 2024
1 check passed
@msbrogli msbrogli deleted the feat/sysctl-profiler branch February 14, 2024 22:05
jansegre added a commit that referenced this pull request Feb 15, 2024
@jansegre jansegre mentioned this pull request Feb 15, 2024
1 task
jansegre added a commit that referenced this pull request Feb 15, 2024
@jansegre jansegre mentioned this pull request Feb 15, 2024
2 tasks
@jansegre jansegre mentioned this pull request Feb 26, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants