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

node stats: support infinity #373

Merged
merged 2 commits into from
Oct 11, 2024
Merged

node stats: support infinity #373

merged 2 commits into from
Oct 11, 2024

Conversation

fbs
Copy link

@fbs fbs commented Oct 11, 2024

These values are often float64 but sometimes a string, from the api docs1:

An "Infinity" value for a given flow window indicates that worker
millis have been spent without any events completing processing

This adds a custom float64 type to enable the use of a custom marshaller.

fixes: #372

@kuskoman
Copy link
Owner

@fbs would you mind adding a test to the new type that you created?

@fbs
Copy link
Author

fbs commented Oct 11, 2024

Still need to update the tests, will work on that.

Guess I also need to target v2/master with this PR, what is the process for that? Shall I open a 2nd PR after this lands?

edit: you're too fast @kuskoman :D

@kuskoman
Copy link
Owner

v2 is way less urgent
i will create test suite with e2e for it when the weekend starts

@fbs
Copy link
Author

fbs commented Oct 11, 2024

I pushed a fix so the tests pass, but let me figure out how to test the infinity values as well

fbs added 2 commits October 11, 2024 12:17
These values are often float64 but sometimes a string, from the api
docs[1]:

> An "Infinity" value for a given flow window indicates that worker
> millis have been spent without any events completing processing

This adds a custom float64 type to enable the use of a custom
marshaller.

[1]: https://www.elastic.co/guide/en/logstash/current/node-stats-api.html
@fbs
Copy link
Author

fbs commented Oct 11, 2024

done

@kuskoman kuskoman merged commit 7a7e6a5 into kuskoman:v1 Oct 11, 2024
13 of 14 checks passed
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