Search in sources :

Example 6 with OperationPerf

use of org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerf in project incubator-servicecomb-java-chassis by apache.

the class PublishUtils method addOperationPerfGroups.

public static void addOperationPerfGroups(OperationPerfGroups operationPerfGroups, String transport, String operation, MeasurementNode statusNode) {
    Map<String, OperationPerfGroup> statusMap = operationPerfGroups.getGroups().computeIfAbsent(transport, tn -> {
        return new HashMap<>();
    });
    OperationPerfGroup group = statusMap.computeIfAbsent(statusNode.getName(), status -> {
        return new OperationPerfGroup(transport, status);
    });
    OperationPerf operationPerf = createOperationPerf(operation, statusNode);
    group.addOperationPerf(operationPerf);
}
Also used : HashMap(java.util.HashMap) OperationPerf(org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerf) OperationPerfGroup(org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup)

Aggregations

OperationPerf (org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerf)6 OperationPerfGroup (org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup)4 PerfInfo (org.apache.servicecomb.metrics.core.publish.model.invocation.PerfInfo)3 OperationPerfGroups (org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroups)2 Test (org.junit.Test)2 EventBus (com.google.common.eventbus.EventBus)1 CompositeRegistry (com.netflix.spectator.api.CompositeRegistry)1 VertxImplEx (io.vertx.core.impl.VertxImplEx)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Status (javax.ws.rs.core.Response.Status)1 Holder (javax.xml.ws.Holder)1 Expectations (mockit.Expectations)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