From 92c84a3a9d3329c25a413c6b1f9c6f5f8ba5daaf Mon Sep 17 00:00:00 2001 From: Puneet Khanduri Date: Thu, 8 Dec 2022 10:17:42 +0530 Subject: [PATCH] filter NoDiffs out before adding to counts --- .../scala/ai/diffy/analysis/InMemoryDifferenceCollector.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/ai/diffy/analysis/InMemoryDifferenceCollector.scala b/src/main/scala/ai/diffy/analysis/InMemoryDifferenceCollector.scala index bce5ca8..96aa2fc 100644 --- a/src/main/scala/ai/diffy/analysis/InMemoryDifferenceCollector.scala +++ b/src/main/scala/ai/diffy/analysis/InMemoryDifferenceCollector.scala @@ -69,7 +69,7 @@ class InMemoryEndpointMetadata(receiver: MetricsReceiver) extends EndpointMetada def add(diffs: Map[String, Difference]): Unit = { Try(totalCounter.increment()) totalAtomic.incrementAndGet() - if (diffs.filterNot{case (_, diff) => diff.isInstanceOf[NoDifference]}.nonEmpty) { + if (diffs.filterNot{case (_, diff) => diff.isInstanceOf[NoDifference[_]]}.nonEmpty) { differenceCounter.increment() differenceAtomic.incrementAndGet() }