Skip to content

The design of Meter::Collect() method seems wrong #2

@xiexiaoy

Description

@xiexiaoy

https://github.com/eloqdata/eloq-metrics/blob/9ff8eddfaf3c7980b8585de681a3802efe0cc1ba/include/meter.h#L216C40-L216C60

It inputs a name with each call. The query is needless and a waste of CPU cycles. When users use a meter, they ought to have a handler for that meter.

The interface from prometheus-cpp like tcp_rx_counter.Increment();. As you can see, a query by name is needless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions