mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 16:56:15 +10:00
[유치수] [NOBTS] bugfix terminal statistics
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@953 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -3,7 +3,6 @@ package com.nhn.hippo.web.calltree.server;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.nhn.hippo.web.vo.TerminalRequest;
|
||||
import com.profiler.common.ServiceType;
|
||||
import com.profiler.common.bo.SpanBo;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.profiler.common.bo.SpanBo;
|
||||
public class Server implements Comparable<Server> {
|
||||
private int sequence;
|
||||
private final String id;
|
||||
private final Set<String> agentIds = new HashSet<String>();
|
||||
private final Set<String> agentIds;
|
||||
private final String applicationName;
|
||||
private final String endPoint;
|
||||
private final ServiceType serviceType;
|
||||
@@ -21,6 +20,7 @@ public class Server implements Comparable<Server> {
|
||||
private int recursiveCallCount;
|
||||
|
||||
public Server(SpanBo span) {
|
||||
this.agentIds = new HashSet<String>();
|
||||
this.id = span.getServiceName();
|
||||
|
||||
if (span.getServiceType().isTerminal()) {
|
||||
@@ -35,11 +35,12 @@ public class Server implements Comparable<Server> {
|
||||
this.serviceType = span.getServiceType();
|
||||
}
|
||||
|
||||
public Server(String id, String applicationName, String endPoint, ServiceType serviceType) {
|
||||
public Server(String id, String applicationName, String endPoint, ServiceType serviceType, Set<String> agentIds) {
|
||||
this.id = id;
|
||||
this.applicationName = applicationName;
|
||||
this.endPoint = endPoint;
|
||||
this.serviceType = serviceType;
|
||||
this.agentIds = agentIds;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ServerCallTree {
|
||||
// add terminal servers
|
||||
for (Entry<String, TerminalRequest> entry : terminalRequests.entrySet()) {
|
||||
TerminalRequest terminal = entry.getValue();
|
||||
Server server = new Server(terminal.getTo(), terminal.getTo(), "UNKNOWN", ServiceType.parse(terminal.getToServiceType()));
|
||||
Server server = new Server(terminal.getTo(), terminal.getTo(), "UNKNOWN", ServiceType.parse(terminal.getToServiceType()), terminal.getStatistics().getAgentIds());
|
||||
servers.put(server.getId(), server);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user