diff --git a/gerrit-server/src/main/java/com/google/gerrit/metrics/CallbackMetric.java b/gerrit-server/src/main/java/com/google/gerrit/metrics/CallbackMetric.java index 5dfa96cf40..21e869bba9 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/metrics/CallbackMetric.java +++ b/gerrit-server/src/main/java/com/google/gerrit/metrics/CallbackMetric.java @@ -20,24 +20,8 @@ import com.google.gerrit.extensions.registration.RegistrationHandle; /** * Metric whose value is supplied when the trigger is invoked. * - *
- * CallbackMetric- * + * @see CallbackMetric0 * @paramhits = metricMaker.newCallbackMetric("hits", ...); - * CallbackMetric total = metricMaker.newCallbackMetric("total", ...); - * metricMaker.newTrigger(hits, total, new Runnable() { - * public void run() { - * hits.set(1); - * total.set(5); - * } - * }); - *
+ * CallbackMetric0+ * + * @paramhits = metricMaker.newCallbackMetric("hits", ...); + * CallbackMetric0 total = metricMaker.newCallbackMetric("total", ...); + * metricMaker.newTrigger(hits, total, new Runnable() { + * public void run() { + * hits.set(1); + * total.set(5); + * } + * }); + *
+ * Suitable uses are "total requests handled", "bytes sent", etc. + * Use {@link Description#setRate()} to suggest the monitoring system + * should also track the rate of increments if this is of interest. + *
+ * For an instantaneous read of a value that can change over time
+ * (e.g. "memory in use") use a {@link CallbackMetric}.
+ *
+ * @param
+ * Suitable uses are "total requests handled", "bytes sent", etc.
+ * Use {@link Description#setRate()} to suggest the monitoring system
+ * should also track the rate of increments if this is of interest.
+ *
+ * For an instantaneous read of a value that can change over time
+ * (e.g. "memory in use") use a {@link CallbackMetric}.
+ *
+ * @param
+ * Suitable uses are "total requests handled", "bytes sent", etc.
+ * Use {@link Description#setRate()} to suggest the monitoring system
+ * should also track the rate of increments if this is of interest.
+ *
+ * For an instantaneous read of a value that can change over time
+ * (e.g. "memory in use") use a {@link CallbackMetric}.
+ *
+ * @param
+ * Each unique string will allocate a new submetric. Do not use user
+ * content as a field value as field values are never reclaimed.
+ */
+ public static Field
+ * Each unique string will allocate a new submetric. Do not use user
+ * content as a field value as field values are never reclaimed.
+ */
+ public static Field
+ * Each unique integer will allocate a new submetric. Do not use user
+ * content as a field value as field values are never reclaimed.
+ */
+ public static Field
+ * Each unique integer will allocate a new submetric. Do not use user
+ * content as a field value as field values are never reclaimed.
+ */
+ public static Field
+ * Typical usage in a try-with-resources block:
+ *
+ *
+ * try (Timer1.Context ctx = timer.start(field)) {
+ * }
+ *
+ *
+ * @param