use of com.navercorp.pinpoint.web.vo.Range in project pinpoint by naver.
the class LegacyAgentStatController method getAgentStatV1.
@Deprecated
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/getAgentStat/v1", method = RequestMethod.GET)
@ResponseBody
public LegacyAgentStatChartGroup getAgentStatV1(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam(value = "sampleRate", required = false) Integer sampleRate) throws Exception {
StopWatch watch = new StopWatch();
watch.start("agentStatService.selectAgentStatList");
TimeWindow timeWindow = new TimeWindow(new Range(from, to), new TimeWindowSlotCentricSampler());
LegacyAgentStatChartGroup chartGroup = this.v1Service.selectAgentStatList(agentId, timeWindow);
watch.stop();
if (logger.isInfoEnabled()) {
logger.info("getAgentStatV1(agentId={}, from={}, to={}) : {}ms", agentId, from, to, watch.getLastTaskTimeMillis());
}
return chartGroup;
}
use of com.navercorp.pinpoint.web.vo.Range in project pinpoint by naver.
the class LegacyAgentStatController method getAgentStat.
@Deprecated
@PreAuthorize("hasPermission(new com.navercorp.pinpoint.web.vo.AgentParam(#agentId, #to), 'agentParam', 'inspector')")
@RequestMapping(value = "/getAgentStat", method = RequestMethod.GET)
@ResponseBody
public LegacyAgentStatChartGroup getAgentStat(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam(value = "sampleRate", required = false) Integer sampleRate) throws Exception {
StopWatch watch = new StopWatch();
watch.start("agentStatService.selectAgentStatList");
TimeWindow timeWindow = new TimeWindow(new Range(from, to), new TimeWindowSlotCentricSampler());
LegacyAgentStatChartGroup chartGroup = this.agentStatService.selectAgentStatList(agentId, timeWindow);
watch.stop();
if (logger.isInfoEnabled()) {
logger.info("getAgentStat(agentId={}, from={}, to={}) : {}ms", agentId, from, to, watch.getLastTaskTimeMillis());
}
return chartGroup;
}
use of com.navercorp.pinpoint.web.vo.Range in project pinpoint by naver.
the class MapController method getServerMapData.
/**
* Server map data query within from ~ to timeframe
*
* @param applicationName
* @param serviceTypeCode
* @param from
* @param to
* @return
*/
@RequestMapping(value = "/getServerMapData", method = RequestMethod.GET, params = "serviceTypeCode")
@ResponseBody
public MapWrap getServerMapData(@RequestParam("applicationName") String applicationName, @RequestParam("serviceTypeCode") short serviceTypeCode, @RequestParam("from") long from, @RequestParam("to") long to, @RequestParam(value = "callerRange", defaultValue = DEFAULT_SEARCH_DEPTH) int callerRange, @RequestParam(value = "calleeRange", defaultValue = DEFAULT_SEARCH_DEPTH) int calleeRange) {
final Range range = new Range(from, to);
this.dateLimit.limit(range);
SearchOption searchOption = new SearchOption(callerRange, calleeRange);
assertSearchOption(searchOption);
Application application = applicationFactory.createApplication(applicationName, serviceTypeCode);
return selectApplicationMap(application, range, searchOption);
}
use of com.navercorp.pinpoint.web.vo.Range in project pinpoint by naver.
the class MapController method getResponseTimeHistogramData.
@RequestMapping(value = "/getResponseTimeHistogramData", method = RequestMethod.GET, params = "serviceTypeName")
@ResponseBody
public ApplicationTimeHistogramViewModel getResponseTimeHistogramData(@RequestParam("applicationName") String applicationName, @RequestParam("serviceTypeName") String serviceTypeName, @RequestParam("from") long from, @RequestParam("to") long to) {
final Range range = new Range(from, to);
dateLimit.limit(range);
Application application = applicationFactory.createApplicationByTypeName(applicationName, serviceTypeName);
ApplicationTimeHistogramViewModel applicationTimeHistogramViewModel = mapService.selectResponseTimeHistogramData(application, range);
return applicationTimeHistogramViewModel;
}
use of com.navercorp.pinpoint.web.vo.Range 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);
}
Aggregations