Java Code Examples for com.spotify.metrics.core.SemanticMetricRegistry#meter()

The following examples show how to use com.spotify.metrics.core.SemanticMetricRegistry#meter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SemanticPredictorMetrics.java    From zoltar with Apache License 2.0 5 votes vote down vote up
static Metrics create(final SemanticMetricRegistry registry, final MetricId metricId) {
  final MetricId predictDurationId = metricId.tagged("what", PREDICT_DURATION.tag());
  final MetricId predictRateId = metricId.tagged("what", PREDICT_RATE.tag());
  final MetricId extractDuration = metricId.tagged("what", FEATURE_EXTRACT_DURATION.tag());
  final MetricId extractRate = metricId.tagged("what", FEATURE_EXTRACT_RATE.tag());

  final Timer predictTimer = registry.timer(predictDurationId);
  final Meter predictMeter = registry.meter(predictRateId);
  final Timer extractTimer = registry.timer(extractDuration);
  final Meter extractMeter = registry.meter(extractRate);

  return new AutoValue_SemanticPredictorMetrics_Metrics(
      predictTimer, predictMeter, extractTimer, extractMeter);
}
 
Example 2
Source File: MetricsStats.java    From styx with Apache License 2.0 5 votes vote down vote up
public MetricsStats(SemanticMetricRegistry registry, Time time) {
  this.registry = Objects.requireNonNull(registry);
  this.time = Objects.requireNonNull(time, "time");

  this.submitToRunning = registry.getOrAdd(TRANSITIONING_DURATION, HISTOGRAM);
  this.pullImageErrorMeter = registry.meter(PULL_IMAGE_ERROR_RATE);
  this.naturalTrigger = registry.meter(NATURAL_TRIGGER_RATE);
  this.terminationLogMissing = registry.meter(TERMINATION_LOG_MISSING);
  this.terminationLogInvalid = registry.meter(TERMINATION_LOG_INVALID);
  this.exitCodeMismatch = registry.meter(EXIT_CODE_MISMATCH);
  this.workflowConsumerErrorMeter = registry.meter(WORKFLOW_CONSUMER_ERROR_RATE);
  this.counterCacheHitMeter = registry.meter(COUNTER_CACHE_RATE.tagged(COUNTER_CACHE_RESULT, COUNTER_CACHE_HIT));
  this.counterCacheMissMeter = registry.meter(COUNTER_CACHE_RATE.tagged(COUNTER_CACHE_RESULT, COUNTER_CACHE_MISS));
  this.serviceAccountCleanupMeter = registry.meter(SERVICE_ACCOUNT_CLEANUP_RATE);
  this.storageOperationHistograms = new ConcurrentHashMap<>();
  this.storageOperationMeters = new ConcurrentHashMap<>();
  this.dockerOperationHistograms = new ConcurrentHashMap<>();
  this.dockerOperationMeters = new ConcurrentHashMap<>();
  this.dockerOperationErrorMeters = new ConcurrentHashMap<>();
  this.kubernetesOperationHistograms = new ConcurrentHashMap<>();
  this.kubernetesOperationMeters = new ConcurrentHashMap<>();
  this.kubernetesOperationErrorMeters = new ConcurrentHashMap<>();
  this.exitCodeMeters = new ConcurrentHashMap<>();
  this.resourceConfiguredHistograms = new ConcurrentHashMap<>();
  this.resourceUsedHistograms = new ConcurrentHashMap<>();
  this.resourceDemandedHistograms = new ConcurrentHashMap<>();
  this.eventConsumerErrorMeters = new ConcurrentHashMap<>();
  this.eventConsumerMeters = new ConcurrentHashMap<>();
  this.publishingMeters = new ConcurrentHashMap<>();
  this.publishingErrorMeters = new ConcurrentHashMap<>();
  this.workflowConsumerMeters = new ConcurrentHashMap<>();
  this.tickHistograms = new ConcurrentHashMap<>();
  this.datastoreOperationMeters = new ConcurrentHashMap<>();
}