use of com.navercorp.pinpoint.web.util.TimeWindowSampler in project pinpoint by naver.
the class AgentStatController method getAgentStatChartList.
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/chartList", method = RequestMethod.GET)
@ResponseBody
public List<AgentStatChartGroup> getAgentStatChartList(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to) {
TimeWindowSampler sampler = new TimeWindowSlotCentricSampler();
TimeWindow timeWindow = new TimeWindow(new Range(from, to), sampler);
return this.agentStatChartService.selectAgentChartList(agentId, timeWindow);
}
use of com.navercorp.pinpoint.web.util.TimeWindowSampler in project pinpoint by naver.
the class AgentStatController method getAgentStatChart.
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/chart", method = RequestMethod.GET, params = { "interval" })
@ResponseBody
public AgentStatChartGroup getAgentStatChart(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam("interval") Integer interval) {
final int minSamplingInterval = 5;
final long intervalMs = interval < minSamplingInterval ? minSamplingInterval * 1000L : interval * 1000L;
TimeWindowSampler sampler = new TimeWindowSampler() {
@Override
public long getWindowSize(Range range) {
return intervalMs;
}
};
TimeWindow timeWindow = new TimeWindow(new Range(from, to), sampler);
return this.agentStatChartService.selectAgentChart(agentId, timeWindow);
}
use of com.navercorp.pinpoint.web.util.TimeWindowSampler in project pinpoint by naver.
the class AgentStatController method getAgentStatChart.
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/chart", method = RequestMethod.GET)
@ResponseBody
public AgentStatChartGroup getAgentStatChart(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to) {
TimeWindowSampler sampler = new TimeWindowSlotCentricSampler();
TimeWindow timeWindow = new TimeWindow(new Range(from, to), sampler);
return this.agentStatChartService.selectAgentChart(agentId, timeWindow);
}
use of com.navercorp.pinpoint.web.util.TimeWindowSampler in project pinpoint by naver.
the class AgentStatController method getAgentStatChartList.
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/chartList", method = RequestMethod.GET, params = { "interval" })
@ResponseBody
public List<AgentStatChartGroup> getAgentStatChartList(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam("interval") Integer interval) {
final int minSamplingInterval = 5;
final long intervalMs = interval < minSamplingInterval ? minSamplingInterval * 1000L : interval * 1000L;
TimeWindowSampler sampler = new TimeWindowSampler() {
@Override
public long getWindowSize(Range range) {
return intervalMs;
}
};
TimeWindow timeWindow = new TimeWindow(new Range(from, to), sampler);
return this.agentStatChartService.selectAgentChartList(agentId, timeWindow);
}
Aggregations