Search in sources :

Example 6 with MeasurementTree

use of org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree in project java-chassis by ServiceComb.

the class TestPublishUtils method createThreadPoolPublishModels_empty.

@Test
public void createThreadPoolPublishModels_empty() {
    Map<String, ThreadPoolPublishModel> threadPools = new HashMap<>();
    ThreadPoolMonitorPublishModelFactory.create(new MeasurementTree(), threadPools);
    Assert.assertTrue(threadPools.isEmpty());
}
Also used : ThreadPoolPublishModel(org.apache.servicecomb.metrics.core.publish.model.ThreadPoolPublishModel) HashMap(java.util.HashMap) MeasurementTree(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree) Test(org.junit.Test)

Example 7 with MeasurementTree

use of org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree in project java-chassis by ServiceComb.

the class TestInvocationMetersInitializer method edgeInvocation.

@Test
public void edgeInvocation(@Mocked InvocationFinishEvent event) {
    new Expectations() {

        {
            invocation.isConsumer();
            result = true;
            invocation.isEdge();
            result = true;
            invocation.getRealTransportName();
            result = Const.RESTFUL;
            invocation.getMicroserviceQualifiedName();
            result = "m.s.o";
            invocation.getInvocationStageTrace().calcTotalTime();
            result = 9;
            invocation.getInvocationStageTrace().calcThreadPoolQueueTime();
            result = 9;
            invocation.getInvocationStageTrace().calcClientFiltersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcSendRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcGetConnectionTime();
            result = 4;
            invocation.getInvocationStageTrace().calcWriteToBufferTime();
            result = 5;
            invocation.getInvocationStageTrace().calcWakeConsumer();
            result = 9;
            invocation.getInvocationStageTrace().calcReceiveResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcClientFiltersResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcInvocationPrepareTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcSendResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcServerFiltersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcServerFiltersResponseTime();
            result = 9;
            event.getInvocation();
            result = invocation;
        }
    };
    eventBus.post(event);
    eventBus.post(event);
    globalRegistry.poll(1);
    MeasurementTree tree = new MeasurementTree();
    tree.from(registry.iterator(), new MeasurementGroupConfig(MeterInvocationConst.INVOCATION_NAME));
    assertEquals("[Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=total:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=total:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=total:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=handlers_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=prepare:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=prepare:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=prepare:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_send_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_send_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_send_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_get_connection:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_get_connection:statistic=totalTime:status=0:transport=rest:type=stage,0,8.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_get_connection:statistic=max:status=0:transport=rest:type=stage,0,4.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_write_to_buf:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_write_to_buf:statistic=totalTime:status=0:transport=rest:type=stage,0,1.0E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_write_to_buf:statistic=max:status=0:transport=rest:type=stage,0,5.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wait_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wait_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wait_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wake_consumer:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wake_consumer:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=consumer_wake_consumer:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=client_filters_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=queue:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=queue:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=queue:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=server_filters_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=producer_send_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=producer_send_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=EDGE:stage=producer_send_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9)]", tree.findChild(MeterInvocationConst.INVOCATION_NAME).getMeasurements().toString());
}
Also used : Expectations(mockit.Expectations) MeasurementTree(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree) MeasurementGroupConfig(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementGroupConfig) Test(org.junit.Test)

Example 8 with MeasurementTree

use of org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree in project java-chassis by ServiceComb.

the class TestInvocationMetersInitializer method consumerInvocation.

@Test
public void consumerInvocation(@Mocked InvocationFinishEvent event) {
    new Expectations() {

        {
            invocation.isConsumer();
            result = true;
            invocation.getInvocationType();
            result = InvocationType.CONSUMER;
            invocation.getRealTransportName();
            result = Const.RESTFUL;
            invocation.getMicroserviceQualifiedName();
            result = "m.s.o";
            invocation.getInvocationStageTrace().calcTotalTime();
            result = 9;
            invocation.getInvocationStageTrace().calcClientFiltersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcSendRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcGetConnectionTime();
            result = 4;
            invocation.getInvocationStageTrace().calcWriteToBufferTime();
            result = 5;
            invocation.getInvocationStageTrace().calcWakeConsumer();
            result = 9;
            invocation.getInvocationStageTrace().calcReceiveResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcClientFiltersResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcInvocationPrepareTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersResponseTime();
            result = 9;
            event.getInvocation();
            result = invocation;
        }
    };
    eventBus.post(event);
    eventBus.post(event);
    globalRegistry.poll(1);
    MeasurementTree tree = new MeasurementTree();
    tree.from(registry.iterator(), new MeasurementGroupConfig(MeterInvocationConst.INVOCATION_NAME));
    assertEquals("" + "[Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=total:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=total:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=total:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=handlers_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=prepare:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=prepare:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=prepare:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_send_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_send_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_send_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_get_connection:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_get_connection:statistic=totalTime:status=0:transport=rest:type=stage,0,8.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_get_connection:statistic=max:status=0:transport=rest:type=stage,0,4.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_write_to_buf:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_write_to_buf:statistic=totalTime:status=0:transport=rest:type=stage,0,1.0E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_write_to_buf:statistic=max:status=0:transport=rest:type=stage,0,5.0E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wait_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wait_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wait_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wake_consumer:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wake_consumer:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=consumer_wake_consumer:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=CONSUMER:stage=client_filters_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9)]", tree.findChild(MeterInvocationConst.INVOCATION_NAME).getMeasurements().toString());
}
Also used : Expectations(mockit.Expectations) MeasurementTree(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree) MeasurementGroupConfig(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementGroupConfig) Test(org.junit.Test)

Example 9 with MeasurementTree

use of org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree in project java-chassis by ServiceComb.

the class TestInvocationMetersInitializer method producerInvocation.

@Test
public void producerInvocation(@Mocked InvocationFinishEvent event) {
    new Expectations() {

        {
            invocation.isConsumer();
            result = false;
            invocation.getInvocationType();
            result = InvocationType.PRODUCER;
            invocation.getRealTransportName();
            result = Const.RESTFUL;
            invocation.getMicroserviceQualifiedName();
            result = "m.s.o";
            invocation.getInvocationStageTrace().calcTotalTime();
            result = 9;
            invocation.getInvocationStageTrace().calcInvocationPrepareTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcHandlersResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcThreadPoolQueueTime();
            result = 9;
            invocation.getInvocationStageTrace().calcBusinessTime();
            result = 9;
            invocation.getInvocationStageTrace().calcServerFiltersRequestTime();
            result = 9;
            invocation.getInvocationStageTrace().calcServerFiltersResponseTime();
            result = 9;
            invocation.getInvocationStageTrace().calcSendResponseTime();
            result = 9;
            event.getInvocation();
            result = invocation;
        }
    };
    eventBus.post(event);
    eventBus.post(event);
    globalRegistry.poll(1);
    MeasurementTree tree = new MeasurementTree();
    tree.from(registry.iterator(), new MeasurementGroupConfig(MeterInvocationConst.INVOCATION_NAME));
    assertEquals("" + "[Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=total:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=total:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=total:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=handlers_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=prepare:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=prepare:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=prepare:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=queue:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=queue:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=queue:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=execution:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=execution:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=execution:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_request:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_request:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_request:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=server_filters_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=producer_send_response:statistic=count:status=0:transport=rest:type=stage,0,2.0), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=producer_send_response:statistic=totalTime:status=0:transport=rest:type=stage,0,1.8000000000000002E-8), " + "Measurement(servicecomb.invocation:operation=m.s.o:role=PRODUCER:stage=producer_send_response:statistic=max:status=0:transport=rest:type=stage,0,9.000000000000001E-9)]", tree.findChild(MeterInvocationConst.INVOCATION_NAME).getMeasurements().toString());
}
Also used : Expectations(mockit.Expectations) MeasurementTree(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree) MeasurementGroupConfig(org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementGroupConfig) Test(org.junit.Test)

Aggregations

MeasurementTree (org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementTree)9 MeasurementGroupConfig (org.apache.servicecomb.foundation.metrics.publish.spectator.MeasurementGroupConfig)7 Test (org.junit.Test)7 Expectations (mockit.Expectations)6 HashMap (java.util.HashMap)2 ThreadPoolPublishModel (org.apache.servicecomb.metrics.core.publish.model.ThreadPoolPublishModel)2 EventBus (com.google.common.eventbus.EventBus)1 Measurement (com.netflix.spectator.api.Measurement)1 VertxImpl (io.vertx.core.impl.VertxImpl)1 Collections (java.util.Collections)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Status (javax.ws.rs.core.Response.Status)1 Injectable (mockit.Injectable)1 Mock (mockit.Mock)1 MockUp (mockit.MockUp)1 Mocked (mockit.Mocked)1 LoggingEvent (org.apache.log4j.spi.LoggingEvent)1 Const (org.apache.servicecomb.core.Const)1 Holder (org.apache.servicecomb.foundation.common.Holder)1