Skip to content

Commit

Permalink
MINOR: Rename metric in MetricsResourceMethodApplicationListener (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwush authored Aug 3, 2022
1 parent d4c583c commit 8ef3ca2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public MethodMetrics(ResourceMethod method, PerformanceMetric annotation, Metric
"The average number of HTTP requests per second.", allTags);
this.requestSizeSensor.add(metricName, new Rate(new WindowedCount()));
metricName = new MetricName(
getName(method, annotation, "request-cumulative-count"), metricGrpName,
getName(method, annotation, "request-total"), metricGrpName,
"The request count using a cumulative counter", allTags);
this.requestSizeSensor.add(metricName, new CumulativeCount());
metricName = new MetricName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public void testSuccessMetrics() {
for (KafkaMetric metric : TestMetricsReporter.getMetricTimeseries()) {
switch (metric.metricName().name()) {
case "request-count": // global metrics
case "request-cumulative-count": // global metrics
case "request-total": // global metrics
assertMetric(metric, totalRequests);
totalRequestsCheckpoint++;
break;
case "hello.request-count": // method metrics
case "hello.request-cumulative-count": // method metrics
case "hello.request-total": // method metrics
if (metric.metricName().tags().containsValue("value1")) {
assertMetric(metric, (totalRequests + 1) / 3);
helloTag1RequestsCheckpoint++;
Expand Down

0 comments on commit 8ef3ca2

Please sign in to comment.