Search in sources :

Example 11 with TimeWindow

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

the class SampledAgentStatResultExtractorTest method ten_to_one_sample_should_down_sample_correctly.

@Test
public void ten_to_one_sample_should_down_sample_correctly() throws Exception {
    // Given
    final int numValues = 100;
    final long initialTimestamp = System.currentTimeMillis();
    final long finalTimestamp = initialTimestamp + (DEFAULT_TIME_INTERVAL * numValues);
    final TimeWindow timeWindow = new TimeWindow(Range.newRange(initialTimestamp, finalTimestamp), TEN_TO_ONE_SAMPLER);
    final List<TestAgentStatDataPoint> dataPoints = createDataPoints(finalTimestamp, DEFAULT_TIME_INTERVAL, numValues);
    final Map<Long, List<TestAgentStatDataPoint>> expectedDataPointSlotMap = getExpectedDataPointSlotMap(timeWindow, dataPoints);
    when(this.rowMapper.mapRow(this.result, 0)).thenReturn(dataPoints);
    TestAgentStatSampler testAgentStatSampler = new TestAgentStatSampler();
    SampledAgentStatResultExtractor<TestAgentStatDataPoint, TestSampledAgentStatDataPoint> resultExtractor = new SampledAgentStatResultExtractor<>(timeWindow, this.rowMapper, testAgentStatSampler);
    // When
    List<TestSampledAgentStatDataPoint> sampledDataPoints = resultExtractor.extractData(this.resultScanner);
    // Then
    for (TestSampledAgentStatDataPoint sampledDataPoint : sampledDataPoints) {
        List<TestAgentStatDataPoint> expectedSampledDataPoints = expectedDataPointSlotMap.get(sampledDataPoint.getBaseTimestamp());
        Assert.assertEquals(expectedSampledDataPoints, sampledDataPoint.getDataPointsToSample());
    }
}
Also used : TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) AgentStatDataPoint(com.navercorp.pinpoint.common.server.bo.stat.AgentStatDataPoint) SampledAgentStatDataPoint(com.navercorp.pinpoint.web.vo.stat.SampledAgentStatDataPoint) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test)

Example 12 with TimeWindow

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

the class SampledAgentStatResultExtractorTest method two_to_one_sample_should_down_sample_correctly.

@Test
public void two_to_one_sample_should_down_sample_correctly() throws Exception {
    // Given
    final int numValues = 20;
    final long initialTimestamp = System.currentTimeMillis();
    final long finalTimestamp = initialTimestamp + (DEFAULT_TIME_INTERVAL * numValues);
    final TimeWindow timeWindow = new TimeWindow(Range.newRange(initialTimestamp, finalTimestamp), TWO_TO_ONE_SAMPLER);
    final List<TestAgentStatDataPoint> dataPoints = createDataPoints(finalTimestamp, DEFAULT_TIME_INTERVAL, numValues);
    final Map<Long, List<TestAgentStatDataPoint>> expectedDataPointSlotMap = getExpectedDataPointSlotMap(timeWindow, dataPoints);
    when(this.rowMapper.mapRow(this.result, 0)).thenReturn(dataPoints);
    TestAgentStatSampler testAgentStatSampler = new TestAgentStatSampler();
    SampledAgentStatResultExtractor<TestAgentStatDataPoint, TestSampledAgentStatDataPoint> resultExtractor = new SampledAgentStatResultExtractor<>(timeWindow, this.rowMapper, testAgentStatSampler);
    // When
    List<TestSampledAgentStatDataPoint> sampledDataPoints = resultExtractor.extractData(this.resultScanner);
    // Then
    for (TestSampledAgentStatDataPoint sampledDataPoint : sampledDataPoints) {
        List<TestAgentStatDataPoint> expectedSampledDataPoints = expectedDataPointSlotMap.get(sampledDataPoint.getBaseTimestamp());
        Assert.assertEquals(expectedSampledDataPoints, sampledDataPoint.getDataPointsToSample());
    }
}
Also used : TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) AgentStatDataPoint(com.navercorp.pinpoint.common.server.bo.stat.AgentStatDataPoint) SampledAgentStatDataPoint(com.navercorp.pinpoint.web.vo.stat.SampledAgentStatDataPoint) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test)

Example 13 with TimeWindow

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

the class FilteredMapServiceImplTest method twoTier.

/**
 * USER -> ROOT_APP -> APP_A -> CACHE
 */
@Test
public void twoTier() {
    // Given
    Range originalRange = Range.newRange(1000, 2000);
    Range scanRange = Range.newRange(1000, 2000);
    final TimeWindow timeWindow = new TimeWindow(originalRange, TimeWindowDownSampler.SAMPLER);
    // root app span
    long rootSpanId = RANDOM.nextLong();
    long rootSpanStartTime = 1000L;
    long rootSpanCollectorAcceptTime = 1210L;
    int rootSpanElapsed = 200;
    SpanBo rootSpan = new TestTraceUtils.SpanBuilder("ROOT_APP", "root-agent").spanId(rootSpanId).startTime(rootSpanStartTime).collectorAcceptTime(rootSpanCollectorAcceptTime).elapsed(rootSpanElapsed).build();
    // app A span
    long appASpanId = RANDOM.nextLong();
    long appASpanStartTime = 1020L;
    long appASpanCollectorAcceptTime = 1090L;
    int appASpanElapsed = 160;
    SpanBo appASpan = new TestTraceUtils.SpanBuilder("APP_A", "app-a").spanId(appASpanId).parentSpan(rootSpan).startTime(appASpanStartTime).collectorAcceptTime(appASpanCollectorAcceptTime).elapsed(appASpanElapsed).build();
    // root app -> app A rpc span event
    SpanEventBo rootRpcSpanEvent = new TestTraceUtils.RpcSpanEventBuilder("www.foo.com/bar", 10, 190).nextSpanId(appASpanId).build();
    rootSpan.addSpanEvent(rootRpcSpanEvent);
    // app A -> cache span event
    int cacheStartElapsed = 20;
    int cacheEndElapsed = 130;
    SpanEventBo appACacheSpanEvent = new TestTraceUtils.CacheSpanEventBuilder("CacheName", "1.1.1.1", cacheStartElapsed, cacheEndElapsed).build();
    appASpan.addSpanEvent(appACacheSpanEvent);
    when(traceDao.selectAllSpans(anyList(), isNull())).thenReturn(Collections.singletonList(Arrays.asList(rootSpan, appASpan)));
    // When
    final FilteredMapServiceOption option = new FilteredMapServiceOption.Builder(Collections.emptyList(), originalRange, scanRange, 1, 1, Filter.acceptAllFilter(), 0).build();
    ApplicationMap applicationMap = filteredMapService.selectApplicationMapWithScatterData(option);
    // Then
    Collection<Node> nodes = applicationMap.getNodes();
    Assert.assertEquals(4, nodes.size());
    for (Node node : nodes) {
        Application application = node.getApplication();
        if (application.getName().equals("ROOT_APP") && application.getServiceType().getCode() == TestTraceUtils.USER_TYPE_CODE) {
            // USER node
            NodeHistogram nodeHistogram = node.getNodeHistogram();
            // histogram
            Histogram applicationHistogram = nodeHistogram.getApplicationHistogram();
            assertHistogram(applicationHistogram, 1, 0, 0, 0, 0);
            Map<String, Histogram> agentHistogramMap = nodeHistogram.getAgentHistogramMap();
            Assert.assertTrue(agentHistogramMap.isEmpty());
            // time histogram
            HistogramSchema histogramSchema = node.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(rootSpanCollectorAcceptTime), 1));
            List<TimeViewModel> applicationTimeHistogram = nodeHistogram.getApplicationTimeHistogram(node.getTimeHistogramFormat());
            assertTimeHistogram(applicationTimeHistogram, histogramSchema.getFastSlot(), expectedTimeCounts);
            AgentResponseTimeViewModelList agentTimeHistogram = nodeHistogram.getAgentTimeHistogram(TimeHistogramFormat.V1);
            Assert.assertTrue(agentTimeHistogram.getAgentResponseTimeViewModelList().isEmpty());
        } else if (application.getName().equals("ROOT_APP") && application.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE) {
            // ROOT_APP node
            NodeHistogram nodeHistogram = node.getNodeHistogram();
            // histogram
            Histogram applicationHistogram = nodeHistogram.getApplicationHistogram();
            assertHistogram(applicationHistogram, 1, 0, 0, 0, 0);
            Map<String, Histogram> agentHistogramMap = nodeHistogram.getAgentHistogramMap();
            assertAgentHistogram(agentHistogramMap, "root-agent", 1, 0, 0, 0, 0);
            // time histogram
            HistogramSchema histogramSchema = node.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(rootSpanCollectorAcceptTime), 1));
            List<TimeViewModel> applicationTimeHistogram = nodeHistogram.getApplicationTimeHistogram(node.getTimeHistogramFormat());
            assertTimeHistogram(applicationTimeHistogram, histogramSchema.getFastSlot(), expectedTimeCounts);
            AgentResponseTimeViewModelList agentTimeHistogram = nodeHistogram.getAgentTimeHistogram(TimeHistogramFormat.V1);
            assertAgentTimeHistogram(agentTimeHistogram.getAgentResponseTimeViewModelList(), "root-agent", histogramSchema.getFastSlot(), expectedTimeCounts);
        } else if (application.getName().equals("APP_A") && application.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE) {
            // APP_A node
            NodeHistogram nodeHistogram = node.getNodeHistogram();
            // histogram
            Histogram applicationHistogram = nodeHistogram.getApplicationHistogram();
            assertHistogram(applicationHistogram, 1, 0, 0, 0, 0);
            Map<String, Histogram> agentHistogramMap = nodeHistogram.getAgentHistogramMap();
            assertAgentHistogram(agentHistogramMap, "app-a", 1, 0, 0, 0, 0);
            // time histogram
            HistogramSchema histogramSchema = node.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(appASpanCollectorAcceptTime), 1));
            List<TimeViewModel> applicationTimeHistogram = nodeHistogram.getApplicationTimeHistogram(node.getTimeHistogramFormat());
            assertTimeHistogram(applicationTimeHistogram, histogramSchema.getFastSlot(), expectedTimeCounts);
            AgentResponseTimeViewModelList agentTimeHistogram = nodeHistogram.getAgentTimeHistogram(TimeHistogramFormat.V1);
            assertAgentTimeHistogram(agentTimeHistogram.getAgentResponseTimeViewModelList(), "app-a", histogramSchema.getFastSlot(), expectedTimeCounts);
        } else if (application.getName().equals("CacheName") && application.getServiceType().getCode() == TestTraceUtils.CACHE_TYPE_CODE) {
            // CACHE node
            NodeHistogram nodeHistogram = node.getNodeHistogram();
            // histogram
            Histogram applicationHistogram = nodeHistogram.getApplicationHistogram();
            assertHistogram(applicationHistogram, 0, 1, 0, 0, 0);
            Map<String, Histogram> agentHistogramMap = nodeHistogram.getAgentHistogramMap();
            assertAgentHistogram(agentHistogramMap, "1.1.1.1", 0, 1, 0, 0, 0);
            // time histogram
            HistogramSchema histogramSchema = node.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(appASpanStartTime + cacheStartElapsed), 1));
            List<TimeViewModel> applicationTimeHistogram = nodeHistogram.getApplicationTimeHistogram(node.getTimeHistogramFormat());
            assertTimeHistogram(applicationTimeHistogram, histogramSchema.getNormalSlot(), expectedTimeCounts);
            AgentResponseTimeViewModelList agentTimeHistogram = nodeHistogram.getAgentTimeHistogram(TimeHistogramFormat.V1);
            assertAgentTimeHistogram(agentTimeHistogram.getAgentResponseTimeViewModelList(), "1.1.1.1", histogramSchema.getNormalSlot(), expectedTimeCounts);
        } else {
            fail("Unexpected node : " + node);
        }
    }
    Collection<Link> links = applicationMap.getLinks();
    Assert.assertEquals(3, links.size());
    for (Link link : links) {
        Application fromApplication = link.getFrom().getApplication();
        Application toApplication = link.getTo().getApplication();
        if ((fromApplication.getName().equals("ROOT_APP") && fromApplication.getServiceType().getCode() == TestTraceUtils.USER_TYPE_CODE) && (toApplication.getName().equals("ROOT_APP") && toApplication.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE)) {
            // histogram
            Histogram histogram = link.getHistogram();
            assertHistogram(histogram, 1, 0, 0, 0, 0);
            // time histogram
            List<TimeViewModel> linkApplicationTimeSeriesHistogram = link.getLinkApplicationTimeSeriesHistogram();
            HistogramSchema targetHistogramSchema = toApplication.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(rootSpanCollectorAcceptTime), 1));
            assertTimeHistogram(linkApplicationTimeSeriesHistogram, targetHistogramSchema.getFastSlot(), expectedTimeCounts);
        } else if ((fromApplication.getName().equals("ROOT_APP") && fromApplication.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE) && (toApplication.getName().equals("APP_A") && toApplication.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE)) {
            // histogram
            Histogram histogram = link.getHistogram();
            assertHistogram(histogram, 1, 0, 0, 0, 0);
            // time histogram
            List<TimeViewModel> linkApplicationTimeSeriesHistogram = link.getLinkApplicationTimeSeriesHistogram();
            HistogramSchema targetHistogramSchema = toApplication.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(appASpanCollectorAcceptTime), 1));
            assertTimeHistogram(linkApplicationTimeSeriesHistogram, targetHistogramSchema.getFastSlot(), expectedTimeCounts);
        } else if ((fromApplication.getName().equals("APP_A") && fromApplication.getServiceType().getCode() == TestTraceUtils.TEST_STAND_ALONE_TYPE_CODE) && (toApplication.getName().equals("CacheName") && toApplication.getServiceType().getCode() == TestTraceUtils.CACHE_TYPE_CODE)) {
            // histogram
            Histogram histogram = link.getHistogram();
            assertHistogram(histogram, 0, 1, 0, 0, 0);
            // time histogram
            List<TimeViewModel> linkApplicationTimeSeriesHistogram = link.getLinkApplicationTimeSeriesHistogram();
            HistogramSchema targetHistogramSchema = toApplication.getServiceType().getHistogramSchema();
            List<ResponseTimeViewModel.TimeCount> expectedTimeCounts = Collections.singletonList(new ResponseTimeViewModel.TimeCount(timeWindow.refineTimestamp(appASpanStartTime + cacheStartElapsed), 1));
            assertTimeHistogram(linkApplicationTimeSeriesHistogram, targetHistogramSchema.getNormalSlot(), expectedTimeCounts);
        } else {
            Assert.fail("Unexpected link : " + link);
        }
    }
}
Also used : ApplicationMap(com.navercorp.pinpoint.web.applicationmap.ApplicationMap) NodeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.NodeHistogram) Histogram(com.navercorp.pinpoint.web.applicationmap.histogram.Histogram) Node(com.navercorp.pinpoint.web.applicationmap.nodes.Node) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) AgentResponseTimeViewModelList(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModelList) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) List(java.util.List) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) AgentResponseTimeViewModelList(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModelList) AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel) NodeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.NodeHistogram) Range(com.navercorp.pinpoint.web.vo.Range) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) TestTraceUtils(com.navercorp.pinpoint.web.TestTraceUtils) AgentResponseTimeViewModel(com.navercorp.pinpoint.web.view.AgentResponseTimeViewModel) TimeViewModel(com.navercorp.pinpoint.web.view.TimeViewModel) ResponseTimeViewModel(com.navercorp.pinpoint.web.view.ResponseTimeViewModel) Application(com.navercorp.pinpoint.web.vo.Application) Map(java.util.Map) ApplicationMap(com.navercorp.pinpoint.web.applicationmap.ApplicationMap) Link(com.navercorp.pinpoint.web.applicationmap.link.Link) Test(org.junit.Test)

Example 14 with TimeWindow

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

the class ApplicationDataSourceChartGroupTest method createApplicationDataSourceChartGroup.

@Test
public void createApplicationDataSourceChartGroup() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinDataSourceBo> aggreJoinDataSourceBoList = new ArrayList<>();
    AggreJoinDataSourceBo aggreJoinDataSourceBo1 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 30, 25, "agent_id_1", 60, "agent_id_6", time);
    AggreJoinDataSourceBo aggreJoinDataSourceBo2 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 20, 5, "agent_id_2", 30, "agent_id_7", time - 60000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo3 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 10, 25, "agent_id_3", 50, "agent_id_8", time - 120000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo4 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 40, 4, "agent_id_4", 70, "agent_id_9", time - 180000);
    AggreJoinDataSourceBo aggreJoinDataSourceBo5 = new AggreJoinDataSourceBo((short) 1000, "jdbc:mysql", 50, 25, "agent_id_5", 80, "agent_id_10", time - 240000);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo1);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo2);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo3);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo4);
    aggreJoinDataSourceBoList.add(aggreJoinDataSourceBo5);
    StatChartGroup applicationDataSourceChartGroup = new ApplicationDataSourceChart.ApplicationDataSourceChartGroup(timeWindow, "jdbc:mysql", "dbcp2", aggreJoinDataSourceBoList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationDataSourceChartGroup.getCharts();
    assertEquals(1, charts.size());
    Chart dataSourceChart = charts.get(ApplicationDataSourceChart.ApplicationDataSourceChartGroup.DataSourceChartType.ACTIVE_CONNECTION_SIZE);
    List<Point> dataSourcePoints = dataSourceChart.getPoints();
    assertEquals(5, dataSourcePoints.size());
    int index = dataSourcePoints.size();
    for (Point point : dataSourcePoints) {
        testDataSource((IntApplicationStatPoint) point, aggreJoinDataSourceBoList.get(--index));
    }
}
Also used : ArrayList(java.util.ArrayList) Point(com.navercorp.pinpoint.web.vo.chart.Point) Range(com.navercorp.pinpoint.web.vo.Range) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) Point(com.navercorp.pinpoint.web.vo.chart.Point) StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) AggreJoinDataSourceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceBo) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Example 15 with TimeWindow

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

the class ApplicationFileDescriptorChartGroupTest method createApplicationFileDescriptorChartGroupTest.

@Test
public void createApplicationFileDescriptorChartGroupTest() {
    long time = 1495418083250L;
    Range range = Range.newRange(time - 240000, time);
    TimeWindow timeWindow = new TimeWindow(range);
    List<AggreJoinFileDescriptorBo> aggreFileDescriptorList = new ArrayList<>(5);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo1 = new AggreJoinFileDescriptorBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", time);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo2 = new AggreJoinFileDescriptorBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", time - 60000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo3 = new AggreJoinFileDescriptorBo("testApp", 33, 39, "agent3_1", 9, "agent3_2", time - 120000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo4 = new AggreJoinFileDescriptorBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", time - 180000);
    AggreJoinFileDescriptorBo aggreJoinFileDescriptorBo5 = new AggreJoinFileDescriptorBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", time - 240000);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo1);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo2);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo3);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo4);
    aggreFileDescriptorList.add(aggreJoinFileDescriptorBo5);
    StatChartGroup applicationFileDescriptorChartGroup = new ApplicationFileDescriptorChart.ApplicationFileDescriptorChartGroup(timeWindow, aggreFileDescriptorList);
    Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationFileDescriptorChartGroup.getCharts();
    assertEquals(1, charts.size());
    Chart fileDescriptorChart = charts.get(ApplicationFileDescriptorChart.ApplicationFileDescriptorChartGroup.FileDescriptorChartType.OPEN_FILE_DESCRIPTOR_COUNT);
    List<Point> fileDescriptorPoints = fileDescriptorChart.getPoints();
    assertEquals(5, fileDescriptorPoints.size());
    int index = fileDescriptorPoints.size();
    for (Point point : fileDescriptorPoints) {
        testOpenFileDescriptor((LongApplicationStatPoint) point, aggreFileDescriptorList.get(--index));
    }
}
Also used : ArrayList(java.util.ArrayList) Point(com.navercorp.pinpoint.web.vo.chart.Point) Range(com.navercorp.pinpoint.web.vo.Range) TimeWindow(com.navercorp.pinpoint.web.util.TimeWindow) Point(com.navercorp.pinpoint.web.vo.chart.Point) AggreJoinFileDescriptorBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinFileDescriptorBo) StatChartGroup(com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup) Chart(com.navercorp.pinpoint.web.vo.chart.Chart) Test(org.junit.Test)

Aggregations

TimeWindow (com.navercorp.pinpoint.web.util.TimeWindow)42 Test (org.junit.Test)26 Range (com.navercorp.pinpoint.web.vo.Range)25 ArrayList (java.util.ArrayList)14 StatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup)13 Chart (com.navercorp.pinpoint.web.vo.chart.Chart)12 Point (com.navercorp.pinpoint.web.vo.chart.Point)12 TimeWindowSampler (com.navercorp.pinpoint.web.util.TimeWindowSampler)8 TimeWindowSlotCentricSampler (com.navercorp.pinpoint.web.util.TimeWindowSlotCentricSampler)8 AgentStatDataPoint (com.navercorp.pinpoint.common.server.bo.stat.AgentStatDataPoint)7 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)7 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)7 SampledDataSource (com.navercorp.pinpoint.web.vo.stat.SampledDataSource)6 GetMapping (org.springframework.web.bind.annotation.GetMapping)5 List (java.util.List)4 LinkDataMap (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataMap)3 SampledAgentStatDataPoint (com.navercorp.pinpoint.web.vo.stat.SampledAgentStatDataPoint)3 LegacyAgentStatChartGroup (com.navercorp.pinpoint.web.vo.stat.chart.LegacyAgentStatChartGroup)3 StopWatch (org.springframework.util.StopWatch)3