proxmox/proxmox-metrics/src
Wolfgang Bumiller 3745f36ab1 metrics: use builder pattern for adding tags
Rather than going from a list of `(&str, &str)` tuples to a
`HashMap<String, String>`, add a `.tag()` builder method
and use `Cow` behind the scenes to efficiently allow the
caller to choose between a static literal and a `String`
value.

Previously the methods forced `&str` slices and then
always-copied those into `String`s even if the caller could
just *move* it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 15:23:22 +01:00
..
influxdb metrics: more doc fixups 2022-02-02 14:30:14 +01:00
lib.rs metrics: use builder pattern for adding tags 2022-02-02 15:23:22 +01:00