From 9195f53a76a4fbe34eb23eb1d6599b04c2045ce9 Mon Sep 17 00:00:00 2001 From: Rithika Date: Fri, 21 Jul 2023 16:01:16 -0400 Subject: [PATCH] Add additional logging --- .../carbonj/service/accumulator/AccumulatorImpl.java | 2 +- .../carbonj/service/accumulator/AggregateFunction.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AccumulatorImpl.java b/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AccumulatorImpl.java index 6f24dd0f..c2151bdf 100644 --- a/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AccumulatorImpl.java +++ b/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AccumulatorImpl.java @@ -104,7 +104,7 @@ public AccumulatorImpl(MetricRegistry metricRegistry, MetricAggregationPolicyPro @Override public void add(DataPoint m) { - + log.info("Start adding data points"); add(m, System.currentTimeMillis()); } diff --git a/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AggregateFunction.java b/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AggregateFunction.java index c6c40334..88e0bc9a 100644 --- a/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AggregateFunction.java +++ b/carbonj.service/src/main/java/com/demandware/carbonj/service/accumulator/AggregateFunction.java @@ -30,6 +30,7 @@ static AggregateFunction create( String key, MetricAggregationMethod method) case AVG: return new AvgAggregateFunction(); case SUM: + log.info("calling the sum function"); return new SumAggregateFunction(); case CUSTOM1: return custom1( key ); @@ -67,6 +68,8 @@ static class SumAggregateFunction public synchronized AggregateFunction add( DataPoint dataPoint, int now ) { sum += dataPoint.val; + log.info("Calculating the sum for aggreggate function"); + log.info("Print the datapoint name: " + dataPoint.name); return this; }