Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature buckets #37

Merged
merged 10 commits into from
Sep 18, 2018
Merged

Feature buckets #37

merged 10 commits into from
Sep 18, 2018

Conversation

cp3fantasy
Copy link
Contributor

Motivation:

add buckets support to DistributionSummay and Timer

Modification:

add two methods:
DistributionSummay.buckets(long[] buckets)
Timer.buckets(long[] buckets)
add a base class BucketCounter to implement buckets
bucketed metrics will create new metrics with name original_metric_name.buckets and a new tag _bucket and tag values like 0-10,10-100 ... 10000-

@coveralls
Copy link

coveralls commented Sep 13, 2018

} else {
iterator = priorityMetricsCache.getMetricByPriority(priority).iterator();
}
return new MetricIterator(iterator);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SchedulerPoller是主动push模式的一个遍历模式。 新的master代码有了pull 模式,也有个定时遍历逻辑。 稳妥, MetricInterator的封装,尽量提前封装(比如regsitry 的 interator 对象)。 这样无论外部几个遍历主体也没关系。


@Override
public Indicator measure() {
long now = Clock.SYSTEM.wallTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上报的时间要对齐下:lastInitPos.get() * step

@luyiisme
Copy link
Contributor

#40

@luyiisme luyiisme merged commit 44c68b1 into sofastack:master Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants