[유치수] [NOBTS] add applicationName

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@846 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-11-07 05:09:22 +00:00
parent 4c6d63e80f
commit 4751646d2a
19 changed files with 550 additions and 339 deletions
@@ -32,8 +32,7 @@ public class FlowChartController {
@RequestMapping(value = "/flow", method = RequestMethod.GET)
public String flow(Model model, @RequestParam("application") String applicationName, @RequestParam("from") long from, @RequestParam("to") long to) {
String[] agentIds = flow.selectAgentIdsFromApplicationName(applicationName);
Set<TraceId> traceIds = flow.selectTraceIdsFromTraceIndex(agentIds, from, to);
Set<TraceId> traceIds = flow.selectTraceIdsFromApplicationTraceIndex(applicationName, from, to);
RPCCallTree callTree = flow.selectRPCCallTree(traceIds);
@@ -47,15 +46,62 @@ public class FlowChartController {
@RequestMapping(value = "/flowserver", method = RequestMethod.GET)
public String flowserver(Model model, @RequestParam("application") String applicationName, @RequestParam("from") long from, @RequestParam("to") long to) {
String[] agentIds = flow.selectAgentIdsFromApplicationName(applicationName);
// TODO 제거 하거나, interceptor로 할것.
StopWatch watch = new StopWatch();
watch.start("scanTraceindex");
Set<TraceId> traceIds = flow.selectTraceIdsFromTraceIndex(agentIds, from, to);
Set<TraceId> traceIds = flow.selectTraceIdsFromApplicationTraceIndex(applicationName, from, to);
watch.stop();
logger.info("time:{} {}", watch.getLastTaskTimeMillis(), traceIds.size());
watch.start("selectServerCallTree");
ServerCallTree callTree = flow.selectServerCallTree(traceIds);
watch.stop();
logger.info("time:{}", watch.getLastTaskTimeMillis());
model.addAttribute("nodes", callTree.getNodes());
model.addAttribute("links", callTree.getLinks());
model.addAttribute("businessTransactions", callTree.getBusinessTransactions().getBusinessTransactionIterator());
model.addAttribute("traces", callTree.getBusinessTransactions().getTracesIterator());
logger.debug("callTree:{}", callTree);
return "flowserver";
}
@RequestMapping(value = "/flow2", method = RequestMethod.GET)
public String flowbyHost(Model model, @RequestParam("host") String[] hosts, @RequestParam("from") long from, @RequestParam("to") long to) {
String[] agentIds = flow.selectAgentIds(hosts);
Set<TraceId> traceIds = flow.selectTraceIdsFromTraceIndex(agentIds, from, to);
RPCCallTree callTree = flow.selectRPCCallTree(traceIds);
model.addAttribute("nodes", callTree.getNodes());
model.addAttribute("links", callTree.getLinks());
logger.debug("callTree:{}", callTree);
return "flow";
}
@RequestMapping(value = "/flowserver2", method = RequestMethod.GET)
public String flowserverByHost(Model model, @RequestParam("host") String[] hosts, @RequestParam("from") long from, @RequestParam("to") long to) {
String[] agentIds = flow.selectAgentIds(hosts);
// TODO 제거 하거나, interceptor로 할것.
StopWatch watch = new StopWatch();
watch.start("scanTraceindex");
Set<TraceId> traceIds = flow.selectTraceIdsFromTraceIndex(agentIds, from, to);
watch.stop();
logger.info("time:{} {}", watch.getLastTaskTimeMillis(), traceIds.size());
watch.start("selectServerCallTree");
ServerCallTree callTree = flow.selectServerCallTree(traceIds);
watch.stop();
logger.info("time:{}", watch.getLastTaskTimeMillis());