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

cast int metrics to float. avoid influx db cast exception #799

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

tmaitz
Copy link
Contributor

@tmaitz tmaitz commented Oct 11, 2019

No description provided.

@tmaitz
Copy link
Contributor Author

tmaitz commented Oct 11, 2019

fix #776

Copy link

@eIGato eIGato left a comment

Choose a reason for hiding this comment

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

Please add a test for this case.

@@ -49,7 +49,8 @@ def decode_monitoring(self, data):
{"host": host, "comment": host_data.get("comment")},
second_data["timestamp"],
{
metric: value
# cast int to float. avoid https://github.com/yandex/yandex-tank/issues/776
metric: float(value) if type(value) is int else value
Copy link

Choose a reason for hiding this comment

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

                        metric: float(value) if isinstance(value, int) else value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@tmaitz
Copy link
Contributor Author

tmaitz commented Oct 12, 2019

Please add a test for this case.

test added

@eIGato
Copy link

eIGato commented Oct 14, 2019

My remaining comments are just suggestions for cosmetic changes.

@szypulka szypulka merged commit 963b1df into yandex:develop Oct 14, 2019
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.

3 participants