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

Scaling option for values #106

Merged
merged 4 commits into from
Nov 29, 2022
Merged

Conversation

anegrin
Copy link
Contributor

@anegrin anegrin commented Nov 28, 2022

optional mqtt_value_scale defines a scale for conversion; example use case: convert percentage into 0.0-1.0 value range

Copy link
Owner

@hikhvar hikhvar left a comment

Choose a reason for hiding this comment

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

Hey,

I like that idea! I think we need some adjustments like using float64 to support scaling factors <1. And some more tests.

pkg/config/config.go Outdated Show resolved Hide resolved
pkg/metrics/parser_test.go Show resolved Hide resolved
@anegrin anegrin requested a review from hikhvar November 29, 2022 09:34
pkg/metrics/parser.go Outdated Show resolved Hide resolved
@anegrin anegrin requested a review from hikhvar November 29, 2022 15:23
@hikhvar
Copy link
Owner

hikhvar commented Nov 29, 2022

Thank you for your contribution and the patience.

@hikhvar hikhvar merged commit 070e15f into hikhvar:master Nov 29, 2022
@anegrin anegrin deleted the float-value-scale branch November 30, 2022 09:01
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.

None yet

2 participants