use of org.apache.servicecomb.metrics.core.publish.model.invocation.PerfInfo in project incubator-servicecomb-java-chassis by apache.
the class DefaultLogPublisher method printProducerOperationPerf.
protected void printProducerOperationPerf(OperationPerf operationPerf, StringBuilder sb) {
PerfInfo stageTotal = operationPerf.findStage(MeterInvocationConst.STAGE_TOTAL);
PerfInfo stageQueue = operationPerf.findStage(MeterInvocationConst.STAGE_EXECUTOR_QUEUE);
PerfInfo stageExecution = operationPerf.findStage(MeterInvocationConst.STAGE_EXECUTION);
sb.append(String.format(" %-7d %-11.3f %-15.3f %-9.3f %-13.3f %-11.3f %-15.3f %s\n", stageTotal.getTps(), stageTotal.calcMsLatency(), stageTotal.getMsMaxLatency(), stageQueue.calcMsLatency(), stageQueue.getMsMaxLatency(), stageExecution.calcMsLatency(), stageExecution.getMsMaxLatency(), operationPerf.getOperation()));
}
use of org.apache.servicecomb.metrics.core.publish.model.invocation.PerfInfo in project incubator-servicecomb-java-chassis by apache.
the class DefaultLogPublisher method printConsumerOperationPerf.
protected void printConsumerOperationPerf(OperationPerf operationPerf, StringBuilder sb) {
PerfInfo stageTotal = operationPerf.findStage(MeterInvocationConst.STAGE_TOTAL);
sb.append(String.format(" %-7d %-11.3f %-15.3f %s\n", stageTotal.getTps(), stageTotal.calcMsLatency(), stageTotal.getMsMaxLatency(), operationPerf.getOperation()));
}
use of org.apache.servicecomb.metrics.core.publish.model.invocation.PerfInfo in project incubator-servicecomb-java-chassis by apache.
the class TestPublishUtils method createPerfInfo.
@Test
public void createPerfInfo() {
MeasurementNode stageNode = Utils.createStageNode(MeterInvocationConst.STAGE_TOTAL, 10, 10, 100);
PerfInfo perf = PublishUtils.createPerfInfo(stageNode);
Assert.assertEquals(10, perf.getTps());
Assert.assertEquals(1000, perf.calcMsLatency(), 0);
Assert.assertEquals(100000, perf.getMsMaxLatency(), 0);
}
Aggregations