Skip to content

Commit

Permalink
More debug
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzxu-crm committed Aug 30, 2024
1 parent ada6aa3 commit bde314e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ void add( DataPoint m, long currentTimeInMillis )
// one metric can map to 0..N aggregates
List<MetricAggregate> aggregates = policy.getAggregates();

if (m.name.startsWith("pod222.ecom.bjmr.bjmr_prd") && m.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Received metrics " + m.name);
for (MetricAggregate aggregate : aggregates) {
log.warn(aggregate.getAggregateName() + " " + aggregate.getAggregationMethod().name() + " " + aggregate.isDropOriginal());
}
log.warn("============");
}

// no aggregates for this metric - done.
if( aggregates.size() == 0 )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public void apply(MetricAggregate agg, DataPoint m, int now)
return;
}
AggregateFunction f = metrics.computeIfAbsent(key, k -> AggregateFunction.create(k, agg.getAggregationMethod()));
if (m.name.startsWith("pod222.ecom.bjmr.bjmr_prd") && m.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Received metrics " + m.name);
log.warn(f.getType() + " " + agg.getAggregationMethod().name() + " " + key);
log.warn("============");
}
f.add(m, now);
}

Expand Down

0 comments on commit bde314e

Please sign in to comment.