Skip to content

Commit

Permalink
Revert "update metrics added"
Browse files Browse the repository at this point in the history
This reverts commit 9d436d4.

undoing accidental commit
  • Loading branch information
noblepaul committed Jul 29, 2024
1 parent 9d436d4 commit d14cde0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ static class CoresMetricsApiCaller extends MetricsApiCaller {
CoresMetricsApiCaller() {
super(
"core",
"INDEX.merge.,QUERY./get.requestTimes,QUERY./get[shard].requestTimes,QUERY./select.requestTimes,QUERY./select[shard].requestTimes,UPDATE./update.requestTimes,UPDATE./update[local].requestTimes,UPDATE.updateHandler.autoCommits,UPDATE.updateHandler.commits,UPDATE.updateHandler.cumulativeDeletesBy,UPDATE.updateHandler.softAutoCommits,UPDATE.updateHandler.cumulativeAdds,UPDATE.updateHandler.cumulativeDeletesById,UPDATE.updateHandler.cumulativeErrors",
"INDEX.merge.,QUERY./get.requestTimes,QUERY./get[shard].requestTimes,QUERY./select.requestTimes,QUERY./select[shard].requestTimes,UPDATE./update.requestTimes,UPDATE./update[local].requestTimes,UPDATE.updateHandler.autoCommits,UPDATE.updateHandler.commits,UPDATE.updateHandler.cumulativeDeletesBy,UPDATE.updateHandler.softAutoCommits",
"count");
}

Expand Down Expand Up @@ -612,8 +612,6 @@ protected void handle(List<PrometheusMetric> results, JsonNode metrics) throws I
long deleteById = 0;
long deleteByQuery = 0;
long softAutoCommit = 0;
long adds = 0;
long updateErrors = 0;
for (JsonNode core : metrics) {
mergeMajor += getNumber(core, "INDEX.merge.major", property).longValue();
mergeMajorDocs += getNumber(core, "INDEX.merge.major.running.docs").longValue();
Expand All @@ -631,9 +629,6 @@ protected void handle(List<PrometheusMetric> results, JsonNode metrics) throws I
getNumber(core, "UPDATE.updateHandler.cumulativeDeletesById", property).longValue();
deleteByQuery +=
getNumber(core, "UPDATE.updateHandler.cumulativeDeletesByQuery", property).longValue();
adds += getNumber(core, "UPDATE.updateHandler.cumulativeAdds", property).longValue();
updateErrors +=
getNumber(core, "UPDATE.updateHandler.cumulativeErrors", property).longValue();
softAutoCommit += getNumber(core, "UPDATE.updateHandler.softAutoCommits").longValue();
}
results.add(
Expand Down Expand Up @@ -726,18 +721,6 @@ protected void handle(List<PrometheusMetric> results, JsonNode metrics) throws I
PrometheusMetricType.COUNTER,
"cumulative number of deletes by query across cores",
deleteByQuery));
results.add(
new PrometheusMetric(
"doc_adds",
PrometheusMetricType.COUNTER,
"cumulative number of docs added across cores",
adds));
results.add(
new PrometheusMetric(
"update_errors",
PrometheusMetricType.COUNTER,
"cumulative number of errors during updates across cores",
updateErrors));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ public void testCoresMetricsApiCaller() throws Exception {
+ " \"UPDATE.updateHandler.commits\":{\"count\":33},"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":14},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":15},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":150},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":1},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":16},\n"
+ " \"solr.core.testdrive.shard1.replica_n1\":{\n"
+ " \"INDEX.merge.errors\":17,\n"
Expand All @@ -330,8 +328,6 @@ public void testCoresMetricsApiCaller() throws Exception {
+ " \"UPDATE.updateHandler.commits\":{\"count\":34},"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":30},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":31},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":191},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":3},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":32}}}";
String output =
"# HELP merges_major cumulative number of major merges across cores\n"
Expand Down Expand Up @@ -378,13 +374,7 @@ public void testCoresMetricsApiCaller() throws Exception {
+ "deletes_by_id 44\n"
+ "# HELP deletes_by_query cumulative number of deletes by query across cores\n"
+ "# TYPE deletes_by_query counter\n"
+ "deletes_by_query 46\n"
+ "# HELP doc_adds cumulative number of docs added across cores\n"
+ "# TYPE doc_adds counter\n"
+ "doc_adds 341\n"
+ "# HELP update_errors cumulative number of errors during updates across cores\n"
+ "# TYPE update_errors counter\n"
+ "update_errors 4\n";
+ "deletes_by_query 46\n";
assertMetricsApiCaller(new PrometheusMetricsServlet.CoresMetricsApiCaller(), json, 14, output);
}

Expand All @@ -406,8 +396,6 @@ public void testCoresMetricsApiCallerMissingIndex() throws Exception {
+ " \"UPDATE.updateHandler.autoCommits\":4,\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":5},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":6},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":7},\n"
+ " \"solr.core.testdrive.shard1.replica_n1\":{\n"
+ " \"QUERY./get.requestTimes\":{\"count\":32},\n"
Expand All @@ -419,8 +407,6 @@ public void testCoresMetricsApiCallerMissingIndex() throws Exception {
+ " \"UPDATE.updateHandler.autoCommits\":11,\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":12},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":13},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":14},\n"
+ " \"solr.core.loadtest.shard1_0.replica_n7\":{\n"
+ " \"QUERY./get.requestTimes\":{\"count\":35},\n"
Expand All @@ -432,8 +418,6 @@ public void testCoresMetricsApiCallerMissingIndex() throws Exception {
+ " \"UPDATE.updateHandler.autoCommits\":18,\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":19},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":20},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":21},\n"
+ " \"solr.core.local.shard1.replica_n1\":{\n"
+ " \"QUERY./get.requestTimes\":{\"count\":38},\n"
Expand All @@ -445,8 +429,6 @@ public void testCoresMetricsApiCallerMissingIndex() throws Exception {
+ " \"UPDATE.updateHandler.autoCommits\":25,\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesById\":{\"count\":26},\n"
+ " \"UPDATE.updateHandler.cumulativeDeletesByQuery\":{\"count\":27},\n"
+ " \"UPDATE.updateHandler.cumulativeAdds\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.cumulativeErrors\":{\"count\":0},\n"
+ " \"UPDATE.updateHandler.softAutoCommits\":28}}}";
String output =
"# HELP merges_major cumulative number of major merges across cores\n"
Expand Down Expand Up @@ -493,13 +475,7 @@ public void testCoresMetricsApiCallerMissingIndex() throws Exception {
+ "deletes_by_id 62\n"
+ "# HELP deletes_by_query cumulative number of deletes by query across cores\n"
+ "# TYPE deletes_by_query counter\n"
+ "deletes_by_query 66\n"
+ "# HELP doc_adds cumulative number of docs added across cores\n"
+ "# TYPE doc_adds counter\n"
+ "doc_adds 0\n"
+ "# HELP update_errors cumulative number of errors during updates across cores\n"
+ "# TYPE update_errors counter\n"
+ "update_errors 0\n";
+ "deletes_by_query 66\n";
assertMetricsApiCaller(new PrometheusMetricsServlet.CoresMetricsApiCaller(), json, 25, output);
}
}

0 comments on commit d14cde0

Please sign in to comment.