use of org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup in project incubator-servicecomb-java-chassis by apache.
the class DefaultLogPublisher method printConsumerLog.
protected void printConsumerLog(DefaultPublishModel model, StringBuilder sb) {
OperationPerfGroups consumerPerf = model.getConsumer().getOperationPerfGroups();
if (consumerPerf == null) {
return;
}
sb.append("" + "consumer:\n" + " simple:\n" + " status tps latency ").append(latencyDistributionHeader).append("operation\n");
StringBuilder detailsBuilder = new StringBuilder();
// print sample
for (Map<String, OperationPerfGroup> statusMap : consumerPerf.getGroups().values()) {
for (OperationPerfGroup perfGroup : statusMap.values()) {
// append sample
sb.append(printSamplePerf(perfGroup));
// append details
detailsBuilder.append(printConsumerDetailsPerf(perfGroup));
}
}
sb.append(" details:\n").append(detailsBuilder);
}
use of org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup in project incubator-servicecomb-java-chassis by apache.
the class DefaultLogPublisher method printProducerLog.
protected void printProducerLog(DefaultPublishModel model, StringBuilder sb) {
OperationPerfGroups producerPerf = model.getProducer().getOperationPerfGroups();
if (producerPerf == null) {
return;
}
sb.append("" + "producer:\n" + " simple:\n" + " status tps latency ").append(latencyDistributionHeader).append("operation\n");
// use detailsBuilder, we can traverse the map only once
StringBuilder detailsBuilder = new StringBuilder();
// print sample
for (Map<String, OperationPerfGroup> statusMap : producerPerf.getGroups().values()) {
for (OperationPerfGroup perfGroup : statusMap.values()) {
// append sample
sb.append(printSamplePerf(perfGroup));
// append details
detailsBuilder.append(printProducerDetailsPerf(perfGroup));
}
}
// print details
sb.append(" details:\n").append(detailsBuilder);
}
use of org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup in project incubator-servicecomb-java-chassis by apache.
the class DefaultLogPublisher method printEdgeLog.
protected void printEdgeLog(DefaultPublishModel model, StringBuilder sb) {
OperationPerfGroups edgePerf = model.getEdge().getOperationPerfGroups();
if (edgePerf == null) {
return;
}
sb.append("" + "edge:\n" + " simple:\n" + " status tps latency ").append(latencyDistributionHeader).append("operation\n");
StringBuilder detailsBuilder = new StringBuilder();
// print sample
for (Map<String, OperationPerfGroup> statusMap : edgePerf.getGroups().values()) {
for (OperationPerfGroup perfGroup : statusMap.values()) {
// append sample
sb.append(printSamplePerf(perfGroup));
// append details
detailsBuilder.append(printEdgeDetailsPerf(perfGroup));
}
}
sb.append(" details:\n").append(detailsBuilder);
}
use of org.apache.servicecomb.metrics.core.publish.model.invocation.OperationPerfGroup 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 -> new HashMap<>());
OperationPerfGroup group = statusMap.computeIfAbsent(statusNode.getName(), status -> new OperationPerfGroup(transport, status));
OperationPerf operationPerf = createOperationPerf(operation, statusNode);
group.addOperationPerf(operationPerf);
}
Aggregations