未验证 提交 fcf64a21 编写于 作者: 静夜思朝颜's avatar 静夜思朝颜 提交者: GitHub

Change the Apdex metric combine calculator (#6363)

上级 92d0465c
......@@ -19,6 +19,7 @@ Release Notes.
* Add some defensive codes for NPE and bump up Kubernetes client version to expose exception stack trace.
* Update the `timestamp` field type for `LogQuery`.
* Support Zabbix protocol to receive agent metrics.
* Update the Apdex metric combine calculator.
#### UI
* Update selector scroller to show in all pages.
......
......@@ -68,10 +68,10 @@ public abstract class ApdexMetrics extends Metrics implements IntValueHolder {
int t = DICT.lookup(name).intValue();
int t4 = t * 4;
totalNum++;
if (!status || value >= t4) {
if (!status || value > t4) {
return;
}
if (value >= t) {
if (value > t) {
tNum++;
} else {
sNum++;
......
......@@ -47,7 +47,7 @@ public class ApdexMetricsTest {
apdex = new ApdexMetricsImpl();
apdex.combine(2000, "foo", true);
apdex.calculate();
assertThat(apdex.getValue(), is(0));
assertThat(apdex.getValue(), is(5000));
apdex = new ApdexMetricsImpl();
apdex.combine(200, "foo", true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册