DomGarguilo commented on code in PR #4850:
URL: https://github.com/apache/accumulo/pull/4850#discussion_r1746079827


##########
core/src/main/java/org/apache/accumulo/core/metrics/MetricsDocGen.java:
##########
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.metrics;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.TreeSet;
+
+/**
+ * This class generates documentation to inform users of the available metrics 
in a presentable
+ * form.
+ */
+public class MetricsDocGen {
+  private final PrintStream doc;
+  private final TreeSet<Metric> sortedMetrics =
+      new TreeSet<>(Comparator.comparing(Metric::getName));
+
+  void generate() {
+    pageHeader();
+
+    // Generate sections for each category of metrics
+    generateCategorySection(Metric.MetricCategory.GENERAL_SERVER, "General 
Server Metrics");
+    generateCategorySection(Metric.MetricCategory.COMPACTOR, "Compactor 
Metrics");
+    generateCategorySection(Metric.MetricCategory.SCAN_SERVER, "Scan Server 
Metrics");
+    generateCategorySection(Metric.MetricCategory.FATE, "Fate Metrics");
+
+    doc.close();
+  }
+
+  void pageHeader() {
+    doc.println("---");
+    doc.println("title: Metrics Documentation (3.x)");
+    doc.println("category: metrics");
+    doc.println("order: 6");
+    doc.println("---\n");

Review Comment:
   This is what will appear in the drop down menu on the left side of [the user 
manual page](https://accumulo.apache.org/docs/2.x/getting-started/quickstart) 
under the configuration tab. Thanks for pointing this out though because this 
needs to be changed to the configuration category (so it will be put in that 
tab) as well as order 7 so its at the end of the list



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to