Skip to content

Support "arbitrary" mean throughput intervals in Meter #65

@CesarPantoja

Description

@CesarPantoja

The class ExpWeightedMovingAvg has a parameter which allows you to specify the period of reporting, yet there are 3 hardcoded instances in Meter:

            self.m1rate = ExpWeightedMovingAvg(period=1, clock=self.clock)
            self.m5rate = ExpWeightedMovingAvg(period=5, clock=self.clock)
            self.m15rate = ExpWeightedMovingAvg(period=15, clock=self.clock)

Which results in only getting those metrics in the dashboard.

Would be great if you could also specify your own intervals. Something like Meter(clock=self._clock, [1, 5, 15, 30, 60])

Would this be useful? Seems fairly trivial to implement, would be happy to create the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions