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

output/json: Set and flush thresholds #1886

Merged
merged 1 commit into from
Mar 11, 2021
Merged

output/json: Set and flush thresholds #1886

merged 1 commit into from
Mar 11, 2021

Conversation

codebien
Copy link
Contributor

@codebien codebien commented Mar 7, 2021

Added the ability to set and flush the thresholds implementing the WithThresholds interface as required from the Engine.

The SetThresholds implementation is the same as the cloud version. If you like the idea, I could also refactor out it to centralize the logic.

Closes #1052

@codebien codebien marked this pull request as draft March 7, 2021 12:12
@codecov-io
Copy link

codecov-io commented Mar 7, 2021

Codecov Report

Merging #1886 (29dd9f9) into master (2036bae) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1886      +/-   ##
==========================================
+ Coverage   71.16%   71.21%   +0.05%     
==========================================
  Files         183      183              
  Lines       14325    14323       -2     
==========================================
+ Hits        10194    10200       +6     
+ Misses       3505     3497       -8     
  Partials      626      626              
Flag Coverage Δ
ubuntu 71.16% <100.00%> (+0.02%) ⬆️
windows 70.83% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
output/json/json.go 85.48% <100.00%> (+1.00%) ⬆️
lib/executor/vu_handle.go 95.23% <0.00%> (+1.90%) ⬆️
core/engine.go 87.50% <0.00%> (+2.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2036bae...10132cf. Read the comment docs.

@codebien codebien marked this pull request as ready for review March 7, 2021 14:34
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Thanks, this LGTM!

Can you please rebase the PR on top of the latest master, the new CI check we added on Friday (#1885) is failing the build, because GitHub runs the CI on top an imaginary merge commit between your branch and master, but the CI check uses your actual PR commits (because it essentially does go get).

output/json/json.go Show resolved Hide resolved
@na-- na-- added this to the v0.32.0 milestone Mar 8, 2021
@codebien
Copy link
Contributor Author

codebien commented Mar 8, 2021

Can you please rebase the PR on top of the latest master

@na-- I rebased, but when I opened the PR I was already based on the latest version. I forked on Saturday.

Can the check work with a fork? Because from my understanding it's trying to exec a go get using my latest commit from my forked version using the k6 path.

@na--
Copy link
Member

na-- commented Mar 9, 2021

Ah, yeah, sorry... 😞 I created #1891 and we'll fix it soon after we release v0.31.0, which would hopefully happen tomorrow. The xk6 CI checks are not blocking the PR merge, so for now please just fix the comment I mentioned inline and we can merge the PR without you rebasing again after we release v0.31.0.

@codebien
Copy link
Contributor Author

codebien commented Mar 9, 2021

so for now please just fix the comment I mentioned

@na-- Sorry, I forgot to mention that the fix is already included in the RS and pushed.

na--
na-- previously approved these changes Mar 9, 2021
@na--
Copy link
Member

na-- commented Mar 9, 2021

@codebien, sorry to bother you again, but could you rebase your PR on top of k6's master once again? @imiric should have fixed the xk6 CI bug with #1894.

The JSON Output implements WithThresholds
so the Engine can set the thresholds invoking SetThresholds.

The flush logic sets the Metric's Thresholds
to write them in the json output.

Closes #1052
@codebien
Copy link
Contributor Author

codebien commented Mar 9, 2021

@na-- Done

Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Thanks! Seems like the check is now ok 🎉

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution!

@na-- na-- merged commit 8ce65c1 into grafana:master Mar 11, 2021
@codebien codebien deleted the 1052 branch March 11, 2021 17:09
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.

JSON output format doesn't include thresholds
5 participants