Search in sources :

Example 6 with TimeWindowSlotCentricSampler

use of com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler in project pinpoint by naver.

the class AgentStatController method getAgentStatChart.

@GetMapping(value = "/chart")
public StatChart getAgentStatChart(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to) {
    TimeWindowSampler sampler = new TimeWindowSlotCentricSampler();
    TimeWindow timeWindow = new TimeWindow(Range.newRange(from, to), sampler);
    return this.agentStatChartService.selectAgentChart(agentId, timeWindow);
}
Also used : TimeWindowSampler(com.navercorp.pinpoint.web.util.TimeWindowSampler) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) TimeWindowSlotCentricSampler(com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 7 with TimeWindowSlotCentricSampler

use of com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler in project pinpoint by naver.

the class AgentStatController method getAgentStatChartList.

@GetMapping(value = "/chartList")
public List<StatChart> getAgentStatChartList(@RequestParam("agentId") String agentId, @RequestParam("from") long from, @RequestParam("to") long to) {
    TimeWindowSampler sampler = new TimeWindowSlotCentricSampler();
    TimeWindow timeWindow = new TimeWindow(Range.newRange(from, to), sampler);
    return this.agentStatChartService.selectAgentChartList(agentId, timeWindow);
}
Also used : TimeWindowSampler(com.navercorp.pinpoint.web.util.TimeWindowSampler) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) TimeWindowSlotCentricSampler(com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 8 with TimeWindowSlotCentricSampler

use of com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler in project pinpoint by naver.

the class ApplicationStatController method getAgentStatChart.

@GetMapping()
public StatChart getAgentStatChart(@RequestParam("applicationId") String applicationId, @RequestParam("from") long from, @RequestParam("to") long to) {
    TimeWindowSlotCentricSampler sampler = new TimeWindowSlotCentricSampler();
    TimeWindow timeWindow = new TimeWindow(Range.newRange(from, to), sampler);
    try {
        return this.applicationStatChartService.selectApplicationChart(applicationId, timeWindow);
    } catch (Exception e) {
        logger.error("error", e);
        throw e;
    }
}
Also used : TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) TimeWindowSlotCentricSampler(com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

TimeWindow (com.navercorp.pinpoint.web.util.TimeWindow)8 TimeWindowSlotCentricSampler (com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler)8 Range (com.navercorp.pinpoint.web.vo.Range)5 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)5 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)5 TimeWindowSampler (com.navercorp.pinpoint.web.util.TimeWindowSampler)4 LegacyAgentStatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.LegacyAgentStatChartGroup)3 StopWatch (org.springframework.util.StopWatch)3 GetMapping (org.springframework.web.bind.annotation.GetMapping)3