Skip to content

Commit

Permalink
[INLONG-11393][Audit] Optimize indicator statistics key for Audit Ser…
Browse files Browse the repository at this point in the history
…vice (#11394)
  • Loading branch information
doleyzi authored Oct 22, 2024
1 parent bd95eeb commit 15ae01a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public int getValue() {
return cycle;
}

@Override
public String toString() {
return String.valueOf(cycle);
}

/**
* Convert int to AuditCycle.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void addApiMetric(ApiType apiType, long duration) {
}

public void addApiMetricNoCache(AuditCycle auditCycle, long duration) {
MetricStat metricStat = metricItem.getMetricStat(String.valueOf(auditCycle.getValue()));
MetricStat metricStat = metricItem.getMetricStat(auditCycle.toString());
metricStat.getCount().addAndGet(1);
metricStat.getDuration().addAndGet(duration);
}
Expand Down

0 comments on commit 15ae01a

Please sign in to comment.