Skip to content

Oximeter could support std::time::Duration as a measurement type #3921

Open
@bnaecker

Description

@bnaecker

We currently support float and integer numeric measurement types. So to represent a duration, one needs to pick a unit and make that clear somehow. Using an f64 with seconds as the unit is a natural choice, but may not be the easiest to work with. We could support std::time::Durations directly, which would remove ambiguity and allow folks to work with whatever scale is natural to their application.

We could convert this to f64s on the way to / from ClickHouse in seconds; use a fixed precision, say u64s in nanoseconds; or use the INTERVAL type. The latter seems like the safest, but it's not clear how well-supported that is on our version of ClickHouse (v22.8.9.24-1).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions