From c13feb5c44b6e2de8e4901583b182bea626908a5 Mon Sep 17 00:00:00 2001 From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:33:43 +0100 Subject: [PATCH] Update QPSMetric Make the QPS metric only use the time from the successful queries. --- .../main/java/org/aksw/iguana/rp/metrics/impl/QPSMetric.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana.resultprocessor/src/main/java/org/aksw/iguana/rp/metrics/impl/QPSMetric.java b/iguana.resultprocessor/src/main/java/org/aksw/iguana/rp/metrics/impl/QPSMetric.java index 449fcb7a6..68e34bbf1 100644 --- a/iguana.resultprocessor/src/main/java/org/aksw/iguana/rp/metrics/impl/QPSMetric.java +++ b/iguana.resultprocessor/src/main/java/org/aksw/iguana/rp/metrics/impl/QPSMetric.java @@ -90,7 +90,8 @@ private Properties putResults(Properties extra, double time, long success, long Properties tmp = getDataFromContainer(extra); if(tmp!=null && tmp.containsKey(queryID)){ Object[] oldArr = (Object[]) tmp.get(queryID); - oldArr[0] = (double) oldArr[0] + time; + if (success > 0) + oldArr[0] = (double) oldArr[0] + time; oldArr[1] = (long) oldArr[1] + success; oldArr[2] = (long) oldArr[2] + failure; if((long)oldArr[3]