Skip to content

what does the reset() of MetricBucket do? seems no references #403

@titanxxh

Description

@titanxxh

func (mb *MetricBucket) reset() {

another question:
the minrt updating function is not thread safe.

func (mb *MetricBucket) AddRt(rt int64) {
	mb.addCount(base.MetricEventRt, rt)
	if rt < atomic.LoadInt64(&mb.minRt) { // here is not thread safe.
		// Might not be accurate here.
		atomic.StoreInt64(&mb.minRt, rt)
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/metricsIssue related to metrics and monitoringgood first issueGood for newcomerskind/enhancementCategory issues or PRs related to enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions