/** * Registers a metric that counts values monotonically increasing with the configured interval for it (if any). * * @param name The name of the metric to register. * @param context The {@link TopologyContext} to register the metric for. * @return The registered {@link AbsoluteCountMetric} that is counting. */ protected AbsoluteCountMetric registerAbsoluteCountMetric(String name, TopologyContext context) { return registerMetric(new AbsoluteCountMetric(), name, context); }
/** * Registers a metric that counts values monotonically increasing with the configured interval for it (if any). * * @param name The name of the metric to register. * @param context The {@link TopologyContext} to register the metric for. * @return The registered {@link AbsoluteCountMetric} that is counting. */ protected AbsoluteCountMetric registerAbsoluteCountMetric(String name, TopologyContext context) { return registerMetric(new AbsoluteCountMetric(), name, context); }
/** * Registers a metric that averages its values with the configured interval for it (if any). * * @param name The name of the metric to register. * @param context The {@link TopologyContext} to register the metric for. * @return The registered {@link ReducedMetric} that is averaging. */ protected ReducedMetric registerAveragingMetric(String name, TopologyContext context) { return registerMetric(new ReducedMetric(new MeanReducer()), name, context); }
/** * Registers a metric that averages its values with the configured interval for it (if any). * * @param name The name of the metric to register. * @param context The {@link TopologyContext} to register the metric for. * @return The registered {@link ReducedMetric} that is averaging. */ protected ReducedMetric registerAveragingMetric(String name, TopologyContext context) { return registerMetric(new ReducedMetric(new MeanReducer()), name, context); }