File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/main/java/github/wujiuye/qps Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,13 @@ public T getWindowValue(long timeMillis) {
170170 }
171171
172172
173+ /**
174+ * return time > start + intervalInMs(1分钟)
175+ *
176+ * @param time
177+ * @param windowWrap
178+ * @return
179+ */
173180 public boolean isWindowDeprecated (long time , WindowWrap <T > windowWrap ) {
174181 return time - windowWrap .windowStart () > intervalInMs ;
175182 }
Original file line number Diff line number Diff line change @@ -145,4 +145,13 @@ public double successQps() {
145145 return rollingCounterInSecond .success () / rollingCounterInSecond .getWindowIntervalInSec ();
146146 }
147147
148+ /**
149+ * 获取1分钟的统计
150+ *
151+ * @return
152+ */
153+ public MetricBucket [] bucketsInMinute () {
154+ return rollingCounterInMinute .buckets ();
155+ }
156+
148157}
You can’t perform that action at this time.
0 commit comments