Skip to content

Commit

Permalink
fixed metric renames for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
  • Loading branch information
gfukushima committed Jun 5, 2024
1 parent edc87af commit 4ed36a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ private void verifyEngineCalled(
private void verifySourceCounter(final Source source, final FallbackReason reason) {
final long actualCount =
stubMetricsSystem
.getCounter(TekuMetricCategory.BEACON, "execution_payload_source")
.getCounter(TekuMetricCategory.BEACON, "execution_payload_source_total")
.getValue(source.toString(), reason.toString());
assertThat(actualCount).isOne();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ private void verifyEngineCalled(
private void verifySourceCounter(final Source source, final FallbackReason reason) {
final long actualCount =
stubMetricsSystem
.getCounter(TekuMetricCategory.BEACON, "execution_payload_source")
.getCounter(TekuMetricCategory.BEACON, "execution_payload_source_total")
.getValue(source.toString(), reason.toString());
assertThat(actualCount).isOne();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,8 @@ private static BlobIdentifier blobIdentifierFromBlobSidecar(final BlobSidecar bl
}

private void assertStats(final String type, final String subType, final double count) {
assertThat(getMetricsValues("block_blobs_trackers_pool_stats").get(List.of(type, subType)))
assertThat(
getMetricsValues("block_blobs_trackers_pool_stats_total").get(List.of(type, subType)))
.isEqualTo(count);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void shouldReportTotalNumberOfSuccessesAndFailuresToMetrics() {

private void validateMetrics(final String duty, final long successCount, final long failCount) {
final StubCounter labelledCounter =
metricsSystem.getCounter(TekuMetricCategory.VALIDATOR, "duties_performed");
metricsSystem.getCounter(TekuMetricCategory.VALIDATOR, "duties_performed_total");
assertThat(labelledCounter.getValue(duty, "success")).isEqualTo(successCount);
assertThat(labelledCounter.getValue(duty, "failed")).isEqualTo(failCount);
}
Expand Down

0 comments on commit 4ed36a3

Please sign in to comment.