Change the Apdex metric combine calculator (#6363)
This commit is contained in:
parent
92d0465cd8
commit
fcf64a217f
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue