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

Reverse jobstats HTTP param behavior #78

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RDruon
Copy link
Contributor

@RDruon RDruon commented Sep 13, 2024

Reverse the behavior of the "jobstats" HTTP param.

[root@node1 ~]# curl -s -G http://localhost:32221/metrics | grep jobid | wc -l
0
[root@node1 ~]# curl -s -G http://localhost:32221/metrics -d "jobstats" | grep jobid | wc -l
0
[root@node1 ~]# curl -s -G http://localhost:32221/metrics -d "jobstats=any" | grep jobid | wc -l
0
[root@node1 ~]# curl -s -G http://localhost:32221/metrics -d "jobstats=true" | grep jobid | wc -l
66

0 means no jobstats are shown/processed

@RDruon RDruon self-assigned this Sep 13, 2024
@RDruon RDruon requested a review from jgrund as a code owner September 13, 2024 16:12
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.71%. Comparing base (fbb9f54) to head (3080e6a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   91.73%   91.71%   -0.03%     
==========================================
  Files          41       41              
  Lines        5228     5225       -3     
  Branches     5228     5225       -3     
==========================================
- Hits         4796     4792       -4     
+ Misses        397      394       -3     
- Partials       35       39       +4     
Flag Coverage Δ
2_14_0_ddn133 35.26% <ø> (ø)
2_14_0_ddn145 36.01% <ø> (ø)
all-tests 91.71% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

Benchmark for 4a23da2

Click to view benchmark
Test Base PR %
jobstats 100 4.6±0.88ms 4.6±0.80ms 0.00%
jobstats 1000 42.9±6.97ms 43.8±7.56ms +2.10%

// Only disable jobstats if "jobstats=false"
#[serde(default = "default_as_true")]
// Only enable jobstats if "jobstats=true"
#[serde(default = "default_as_false")]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#[serde(default = "default_as_false")]
#[serde(default)]

Default is false.

Copy link

Benchmark for 533b77d

Click to view benchmark
Test Base PR %
jobstats 100 4.3±0.71ms 4.5±0.86ms +4.65%
jobstats 1000 43.8±8.10ms 45.0±7.89ms +2.74%

jgrund
jgrund previously approved these changes Sep 30, 2024
Copy link

github-actions bot commented Oct 4, 2024

Benchmark for 0873f33

Click to view benchmark
Test Base PR %
jobstats 100 4.3±0.73ms 4.3±0.70ms 0.00%
jobstats 1000 41.1±6.08ms 41.4±5.50ms +0.73%

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