当前位置: 首页>>代码示例>>Java>>正文


Java MetricFilter.ALL属性代码示例

本文整理汇总了Java中com.codahale.metrics.MetricFilter.ALL属性的典型用法代码示例。如果您正苦于以下问题:Java MetricFilter.ALL属性的具体用法?Java MetricFilter.ALL怎么用?Java MetricFilter.ALL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.codahale.metrics.MetricFilter的用法示例。


在下文中一共展示了MetricFilter.ALL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

@Override
public void init(ServletConfig config) throws ServletException {
    super.init(config);

    final ServletContext context = config.getServletContext();
    if (null == registry) {
        final Object registryAttr = context.getAttribute(METRICS_REGISTRY);
        if (registryAttr instanceof MetricRegistry) {
            this.registry = (MetricRegistry) registryAttr;
        } else {
            throw new ServletException("Couldn't find a MetricRegistry instance.");
        }
    }

    filter = (MetricFilter) context.getAttribute(METRIC_FILTER);
    if (filter == null) {
        filter = MetricFilter.ALL;
    }

    this.allowedOrigin = context.getInitParameter(ALLOWED_ORIGIN);
}
 
开发者ID:dhatim,项目名称:dropwizard-prometheus,代码行数:21,代码来源:PrometheusServlet.java

示例2: Builder

private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.clock = Clock.defaultClock();
    this.prefix = null;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:oneops,项目名称:oneops,代码行数:8,代码来源:ElasticsearchReporter.java

示例3: Builder

/** */
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:epam,项目名称:Lagerta,代码行数:7,代码来源:IgniteNodeOverloadReporter.java

示例4: Builder

private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.locale = Locale.getDefault();
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.clock = Clock.defaultClock();
    this.filter = MetricFilter.ALL;
}
 
开发者ID:epam,项目名称:Lagerta,代码行数:8,代码来源:HumanReadableCsvReporter.java

示例5: Builder

private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.prefix = null;
    this.filter = MetricFilter.ALL;
    this.executor = null;
    this.shutdownExecutorOnStop = true;
}
 
开发者ID:dhatim,项目名称:dropwizard-prometheus,代码行数:7,代码来源:PrometheusReporter.java

示例6: getMetricByName

/**
 * Gets stats information of a metric. Returns array of all information for the
 * specified metric.
 *
 * @param metricName metric name
 * @return 200 OK with metric information as array
 * @onos.rsModel Metric
 */
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("{metricName}")
public Response getMetricByName(@PathParam("metricName") String metricName) {
    ObjectNode metricNode = root.putObject("metric");
    MetricFilter filter = metricName != null ? (name, metric) -> name.equals(metricName) : MetricFilter.ALL;
    TreeMultimap<String, Metric> matched = listMetrics(service, filter);

    matched.asMap().get(metricName).forEach(m -> {
        metricNode.set(metricName, codec(Metric.class).encode(m, this));
    });

    return ok(root).build();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:22,代码来源:MetricsWebResource.java

示例7: execute

@Override
protected void execute() {
    MetricsService metricsService = get(MetricsService.class);

    MetricFilter filter = metricName != null ? (name, metric) -> name.equals(metricName) : MetricFilter.ALL;

    TreeMultimap<String, Metric> matched = listMetrics(metricsService, filter);
    matched.asMap().forEach((name, metrics) -> {
        if (outputJson()) {
            metrics.forEach(metric -> print("%s", json(metric)));
        } else {
            metrics.forEach(metric -> printMetric(name, metric));
        }
    });
}
 
开发者ID:shlee89,项目名称:athena,代码行数:15,代码来源:MetricsListCommand.java

示例8: Builder

private Builder(final MetricRegistry metricRegistry, final AmazonCloudWatchAsync cloudWatchAsyncClient, final String namespace) {
    this.metricRegistry = metricRegistry;
    this.cloudWatchAsyncClient = cloudWatchAsyncClient;
    this.namespace = namespace;
    this.percentiles = new Percentile[]{Percentile.P75, Percentile.P95, Percentile.P999};
    this.metricFilter = MetricFilter.ALL;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.globalDimensions = new LinkedHashSet<>();
    this.cwRateUnit = toStandardUnit(rateUnit);
    this.cwDurationUnit = toStandardUnit(durationUnit);
    this.clock = Clock.defaultClock();
}
 
开发者ID:azagniotov,项目名称:codahale-aggregated-metrics-cloudwatch-reporter,代码行数:13,代码来源:CloudWatchReporter.java

示例9: SystemController

public SystemController(Service spark, GraknConfig config, SystemKeyspace systemKeyspace,
                        GraknEngineStatus graknEngineStatus, MetricRegistry metricRegistry) {
    this.systemKeyspace = systemKeyspace;
    this.config = config;

    this.graknEngineStatus = graknEngineStatus;
    this.metricRegistry = metricRegistry;
    DropwizardExports prometheusMetricWrapper = new DropwizardExports(metricRegistry);
    this.prometheusRegistry = new CollectorRegistry();
    prometheusRegistry.register(prometheusMetricWrapper);

    spark.get(REST.WebPath.ROOT, this::getRoot);

    spark.get(REST.WebPath.KB, (req, res) -> getKeyspaces(res));
    spark.get(REST.WebPath.KB_KEYSPACE, this::getKeyspace);
    spark.put(REST.WebPath.KB_KEYSPACE, this::putKeyspace);
    spark.delete(REST.WebPath.KB_KEYSPACE, this::deleteKeyspace);
    spark.get(REST.WebPath.METRICS, this::getMetrics);
    spark.get(REST.WebPath.STATUS, (req, res) -> getStatus());
    spark.get(REST.WebPath.VERSION, (req, res) -> getVersion());

    final TimeUnit rateUnit = TimeUnit.SECONDS;
    final TimeUnit durationUnit = TimeUnit.SECONDS;
    final boolean showSamples = false;
    MetricFilter filter = MetricFilter.ALL;

    this.mapper = new ObjectMapper().registerModule(
            new MetricsModule(rateUnit,
                    durationUnit,
                    showSamples,
                    filter));
}
 
开发者ID:graknlabs,项目名称:grakn,代码行数:32,代码来源:SystemController.java

示例10: Builder

private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.prefix = null;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:Microsoft,项目名称:Availability-Monitor-for-Kafka,代码行数:7,代码来源:StatsdReporter.java

示例11: Builder

public Builder(MetricRegistry registry) {
  this.registry = registry;
  this.expansions = Expansion.ALL;
  this.clock = Clock.defaultClock();
  this.rateUnit = TimeUnit.SECONDS;
  this.durationUnit = TimeUnit.MILLISECONDS;
  this.filter = MetricFilter.ALL;
  this.metricNameFormatter = new DefaultMetricNameFormatter();
  this.tags = new ArrayList<String>();
  this.suppress_bad_analytics = true;
}
 
开发者ID:circonus-labs,项目名称:metrics-circonus,代码行数:11,代码来源:CirconusReporter.java

示例12: Builder

/**
 * Set up the builder.
 * @param registry which registry to report from.
 * @param client a client to use to push the metrics to CloudWatch.
 */
public Builder(MetricRegistry registry, AmazonCloudWatchClient client) {
    this.registry = registry;
    this.client = client;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
    this.dimensions = new HashMap<>();
}
 
开发者ID:basis-technology-corp,项目名称:metrics-cloudwatch-reporter,代码行数:13,代码来源:CloudWatchReporter.java

示例13: Builder

public Builder(MetricRegistry registry) {
	this.registry = registry;

	this.rateUnit = TimeUnit.SECONDS;
	this.durationUnit = TimeUnit.MILLISECONDS;
	this.filter = MetricFilter.ALL;
}
 
开发者ID:hengyunabc,项目名称:metrics-kafka,代码行数:7,代码来源:KafkaReporter.java

示例14: Builder

private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.tags = null;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:iZettle,项目名称:dropwizard-metrics-influxdb,代码行数:7,代码来源:InfluxDbReporter.java

示例15: execute

@Override
protected void execute() {
    MetricsService metricsService = get(MetricsService.class);

    MetricFilter filter = MetricFilter.ALL;

    TreeMultimap<String, Metric> matched = listMetrics(metricsService, filter);
    matched.asMap().forEach((name, metrics) -> {
        for (Metric metric : metrics) {
            printMetric(name, metric);
        }
    });
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:13,代码来源:MetricsListCommand.java


注:本文中的com.codahale.metrics.MetricFilter.ALL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。