Package com.codahale.metrics

Examples of com.codahale.metrics.MetricRegistry


        @SuppressWarnings("unchecked")
        T endpoint = (T) getEndpoint();
        Message in = exchange.getIn();
        String defaultMetricsName = endpoint.getMetricsName();
        String finalMetricsName = getMetricsName(in, defaultMetricsName);
        MetricRegistry registry = endpoint.getRegistry();
        try {
            doProcess(exchange, endpoint, registry, finalMetricsName);
        } catch (Exception e) {
            LOG.warn("Failed to produce metrics for {} in {} - {}", new Object[] {
                finalMetricsName, getClass().getSimpleName(), e.getMessage() });
View Full Code Here


        return type;
    }

    MetricRegistry getOrCreateMetricRegistry(Registry camelRegistry, String registryName) {
        LOG.debug("Looking up MetricRegistry from Camel Registry for name \"{}\"", registryName);
        MetricRegistry result = getMetricRegistryFromCamelRegistry(camelRegistry, registryName);
        if (result == null) {
            LOG.debug("MetricRegistry not found from Camel Registry for name \"{}\"", registryName);
            LOG.info("Creating new default MetricRegistry");
            result = createMetricRegistry();
        }
View Full Code Here

    MetricRegistry getMetricRegistryFromCamelRegistry(Registry camelRegistry, String registryName) {
        return camelRegistry.lookupByNameAndType(registryName, MetricRegistry.class);
    }

    MetricRegistry createMetricRegistry() {
        MetricRegistry registry = new MetricRegistry();
        final Slf4jReporter reporter = Slf4jReporter.forRegistry(registry)
                .outputTo(LOG)
                .convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS)
                .build();
View Full Code Here

    }

    @Override
    protected void doStart() throws Exception {
        if (metricsRegistry == null) {
            metricsRegistry = new MetricRegistry();
        }

        if (useJmx) {
            ManagementAgent agent = getCamelContext().getManagementStrategy().getManagementAgent();
            if (agent != null) {
View Full Code Here

  public void testRepeated(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable{
//    System.out.println(System.getProperty("java.class.path"));


    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
    }};
View Full Code Here

    final OptionManager sess = new SessionOptionManager(opt);

    new NonStrictExpectations() {
      {
        dbContext.getMetrics();
        result = new MetricRegistry();
        dbContext.getAllocator();
        result = new TopLevelAllocator();
        dbContext.getConfig();
        result = config;
        dbContext.getOptionManager();
View Full Code Here

  @Test
  public void testDumpCat(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable
  {

      new NonStrictExpectations(){{
          bitContext.getMetrics(); result = new MetricRegistry();
          bitContext.getAllocator(); result = new TopLevelAllocator();
          bitContext.getConfig(); result = c;
          bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      }};
View Full Code Here

  @Ignore // this doesn't have a sort.  it also causes an infinite loop.  these may or may not be related.
  public void simpleEqualityJoin(@Injectable final DrillbitContext bitContext,
                                 @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
    }};
View Full Code Here

  @Ignore
  public void orderedEqualityLeftJoin(@Injectable final DrillbitContext bitContext,
                                      @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    }};
View Full Code Here

  @Ignore
  public void orderedEqualityInnerJoin(@Injectable final DrillbitContext bitContext,
                                       @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    }};
View Full Code Here

TOP

Related Classes of com.codahale.metrics.MetricRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.