Skip to content

Commit

Permalink
update MaxQps monitor, read/write/total calc independence
Browse files Browse the repository at this point in the history
  • Loading branch information
caojiajun committed Feb 13, 2023
1 parent f873450 commit b6011cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ private static class MaxQps {
long writeQps = write.sumThenReset();
ProxyInfoUtils.updateLastQps(readQps, writeQps);
if (readQps + writeQps > maxQps.qps.get()) {
maxQps.qps.set(readQps + writeQps);
}
if (readQps > maxQps.readQps.get()) {
maxQps.readQps.set(readQps);
}
if (writeQps > maxQps.writeQps.get()) {
maxQps.writeQps.set(writeQps);
maxQps.qps.set(readQps + writeQps);
}
}, 1, 1, TimeUnit.SECONDS);
}
Expand Down
6 changes: 3 additions & 3 deletions docs/redis-proxy/monitor/monitor-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"qps": 7036.9, //总qps(统计周期内的平均值,默认60s)
"writeQps": 3577.2, //写qps(统计周期内的平均值,默认60s)
"readQps": 3459.7, //读qps(统计周期内的平均值,默认60s)
"maxQps": 8036.9, //秒级峰值(如果统计周期为60s,则表示60个s中qps的最大的那个点)
"maxReadQps": 4577.2, //秒级峰值时的readQps(不是read的最大,而是总的最大时的read)
"maxWriteQps": 4459.7 //秒级峰值时的writeQps(不是write的最大,而是总的最大时的write)
"maxQps": 8036.9, //秒级qps峰值(如果统计周期为60s,则表示60个s中qps的最大的那个点)
"maxReadQps": 4577.2, //秒级readQps峰值,read峰值、write峰值、总的峰值可能不是相同时间点,因此:maxReadQps + maxWriteQps != maxQps
"maxWriteQps": 4459.7 //秒级writeQps峰值
}
],
"total": [ //各命令的请求量、qps
Expand Down

0 comments on commit b6011cc

Please sign in to comment.