public synchronized void setNumericMetric(String name, long amt) { MetricsLongValue m = (MetricsLongValue)registry.get(name); if (m == null) { m = new MetricsLongValue(name, this.registry); this.needsUpdateMessage = true; } m.set(amt); }
public RepositoryMetrics(String recordName) { this.recordName = recordName; for (Action action : Action.values()) { rates.put(action, new MetricsTimeVaryingRate(action.name().toLowerCase(), registry)); } for (HBaseAction action : HBaseAction.values()) { hbaseRates.put(action, new MetricsTimeVaryingRate(action.name().toLowerCase(), registry)); } lastMutationEventTimestamp = new MetricsLongValue("timestampLastMutation", registry); context = MetricsUtil.getContext("repository"); metricsRecord = MetricsUtil.createRecord(context, recordName); context.registerUpdater(this); mbean = new RepositoryMetricsMXBean(this.registry); }
public SepMetrics(String recordName) { this.recordName = recordName; metricsRegistry = new MetricsRegistry(); sepProcessingRate = new MetricsTimeVaryingRate("sepProcessed", metricsRegistry); lastTimestampInputProcessed = new MetricsLongValue("lastSepTimestamp", metricsRegistry); context = MetricsUtil.getContext("repository"); metricsRecord = MetricsUtil.createRecord(context, recordName); context.registerUpdater(this); mbean = new SepMetricsMXBean(this.metricsRegistry); }
public SepMetrics(String recordName) { this.recordName = recordName; metricsRegistry = new MetricsRegistry(); sepProcessingRate = new MetricsTimeVaryingRate("sepProcessed", metricsRegistry); lastTimestampInputProcessed = new MetricsLongValue("lastSepTimestamp", metricsRegistry); context = MetricsUtil.getContext("repository"); metricsRecord = MetricsUtil.createRecord(context, recordName); context.registerUpdater(this); mbean = new SepMetricsMXBean(this.metricsRegistry); }