Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

Improve performance of StatisticNode#metrics. issue 1171

Open nathanchoui opened this issue 2 years ago • 0 comments

Describe what this PR does / why we need it Every second Sentinel will aggregate metrics of every resource and write to the metric log, but when aggregating the metric of last second, it actually generates metric items in the past minute , which is not necessary.

Does this pull request fix one issue? issue 1171

Describe how you did it I modified StatisticNode#metrics. It only aggregates the metrics within flush interval. It would be reduce unnecessary metric items

Describe how to verify it Verify the function by running the unit test in StatisticNodeTests#testMetrics

Special notes for reviews

nathanchoui avatar Jul 26 '22 15:07 nathanchoui