opensource4you / astraea

釋放kafka的無限潛能
Apache License 2.0
129 stars 46 forks source link

[STATISTICS] Add sum statistic #1766

Closed chinghongfang closed 1 year ago

chinghongfang commented 1 year ago

實做一個新的統計量 Sum ,用來計算數字的加總,並提供有時間區間加總的算法。

因為 "取最近時間區間 (time window) 的值" 這個用法和 Avg.byTime() 相似,所以將共通的部份取出來另外完成了 WindowedValue

chia7712 commented 1 year ago

這個功能看起來不錯,不過請問一下用途是什麼?是哪個實驗或cost會用到嗎

chinghongfang commented 1 year ago

不過請問一下用途是什麼?是哪個實驗或cost會用到嗎

這個統計量想用在 MetricStore, MetricFetcher 中。

預計要新增以下指標,方便觀察 metric 收集的效率:

  1. number of beans in metric store
  2. number of beans received in the past 10 seconds
  3. number of beans fetched in the past 10 seconds