From b081ea0a117f202f19746f2414dbc7f0b1ed376d Mon Sep 17 00:00:00 2001 From: Ludek Novy <13610612+ludeknovy@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:07:46 +0100 Subject: [PATCH] Fix: apdex calculation (#314) --- .../request-stats/request-stats-compare.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/item-detail/request-stats/request-stats-compare.component.ts b/src/app/item-detail/request-stats/request-stats-compare.component.ts index 5cc51c89..e5190994 100644 --- a/src/app/item-detail/request-stats/request-stats-compare.component.ts +++ b/src/app/item-detail/request-stats/request-stats-compare.component.ts @@ -318,6 +318,9 @@ export class RequestStatsCompareComponent implements OnInit, OnDestroy { } calculateApdex(satisfaction, toleration, samples) { + if (satisfaction === null || toleration === null) { + return + } const apdexValue = roundNumberTwoDecimals((satisfaction + (toleration * 0.5)) / samples) return this.apdexScore(apdexValue) }