Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Stop emit default value for counter TotalError and ReaderRestartProce…
Browse files Browse the repository at this point in the history
…ssing
  • Loading branch information
yujias0706 committed Mar 15, 2021
1 parent 2ac7704 commit 5cce866
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ public static void main(String[] args) {
(MetricsConfiguration.CONFIG_MAP.get(StatsCollector.class).samplingInterval) / 2,
TimeUnit.MILLISECONDS);
METRIC_COLLECTOR_EXECUTOR.addScheduledMetricCollector(StatsCollector.instance());
StatsCollector.instance()
.addDefaultExceptionCode(StatExceptionCode.READER_RESTART_PROCESSING);
METRIC_COLLECTOR_EXECUTOR.setEnabled(true);
METRIC_COLLECTOR_EXECUTOR.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public StatsCollector(String name, int samplingIntervalMillis, Map<String, Strin
super(samplingIntervalMillis, name);
this.metadata = metadata;
addRcaVersionMetadata(this.metadata);
defaultExceptionCodes.add(StatExceptionCode.TOTAL_ERROR);
}

private StatsCollector(Map<String, String> metadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ public void testMain() {
PerformanceAnalyzerApp.main(new String[0]);
Assert.assertFalse(ConfigStatus.INSTANCE.haveValidConfig());
Assert.assertEquals(StatsCollector.instance().getCounters().get("ReaderThreadStopped").get(), 1);
Assert.assertEquals(StatsCollector.instance().getCounters().get("TotalError").get(), 1);
Assert.assertFalse(StatsCollector.instance().getCounters().containsKey("ReaderRestartProcessing"));
}
}

0 comments on commit 5cce866

Please sign in to comment.