Skip to content

Add support of f32 for Gauge and Counter#216

Merged
mxinden merged 6 commits intoprometheus:masterfrom
navaati:more_datatypes
Jul 17, 2024
Merged

Add support of f32 for Gauge and Counter#216
mxinden merged 6 commits intoprometheus:masterfrom
navaati:more_datatypes

Conversation

@navaati
Copy link
Contributor

@navaati navaati commented Jul 17, 2024

No description provided.

@navaati
Copy link
Contributor Author

navaati commented Jul 17, 2024

Still gotta edit the changelog.

navaati added 4 commits July 17, 2024 20:32
Signed-off-by: Léo Gillot-Lamure <leo.gillot@navaati.net>
Signed-off-by: Léo Gillot-Lamure <leo.gillot@navaati.net>
Signed-off-by: Léo Gillot-Lamure <leo.gillot@navaati.net>
Signed-off-by: Léo Gillot-Lamure <leo.gillot@navaati.net>
@navaati
Copy link
Contributor Author

navaati commented Jul 17, 2024

There ya go, changelog done. I took the liberty to merge the entry with @brocaar's, since this PR kinda completes his.

@mxinden I’m a bit afraid about this PR, since it touches Atomic code, but well, I copied the code and searched/replaced. Please take a look !

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Good work. Atomics code looks fine.

Shall we hold off with a release for now?

Comment on lines +9 to +25
### Changed

- `ConstCounter::new` now requires specifying the type of literal arguments, like this: `ConstCounter::new(42u64);`.
See [PR 173].

- Update `prost` dependencies to `v0.12`.
See [PR 198].

[PR 198]: https://github.com/prometheus/client_rust/pull/198

- Add `EncodeGaugeValue` `i32` and `f32`, `EncodeCounterValue` `u32` and `f32` and `EncodeExemplarValue` `f32` and `u32` implementations.
See [PR 173].
### Added

- Support `i32`/`f32` for `Gauge` and `u32`/`f32` for `Counter`/`CounterWithExemplar`.
See [PR 173] and [PR 216].

[PR 173]: https://github.com/prometheus/client_rust/pull/173
[PR 216]: https://github.com/prometheus/client_rust/pull/216
Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Max Inden <mail@max-inden.de>
Signed-off-by: Max Inden <mail@max-inden.de>
@mxinden mxinden merged commit aeca8d8 into prometheus:master Jul 17, 2024
@navaati navaati deleted the more_datatypes branch July 17, 2024 19:15
@navaati
Copy link
Contributor Author

navaati commented Jul 17, 2024

Shall we hold off with a release for now?

If you have enough content for a release, go for it: the sooner you get it in the wild, the sooner you’ll have feedback if there is a problem (not that I think there would)… It’s a breaking release anyway so nobody will get broken on a cargo update.

As for myself I’m happy when I can remove this line https://gitlab.com/navaati/licorne/-/blob/f26f4141c357b41aae2f1235f8fe0cb3bc7af638/firmware/Cargo.toml#L42 :D

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