Search in sources :

Example 6 with NodeHistogramFactory

use of com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory in project pinpoint by naver.

the class ApplicationMapBuilderTest method testEmptyCallData.

@Test
public void testEmptyCallData() {
    Range range = Range.newRange(0, 1000);
    LinkDataDuplexMap linkDataDuplexMap = new LinkDataDuplexMap();
    NodeHistogramFactory nodeHistogramFactory = new DefaultNodeHistogramFactory(mapResponseNodeHistogramDataSource);
    ServerInstanceListFactory serverInstanceListFactory = new DefaultServerInstanceListFactory(agentInfoServerInstanceListDataSource);
    ApplicationMapBuilder applicationMapBuilder = ApplicationMapBuilderTestHelper.createApplicationMapBuilder(range, serialExecutor);
    ApplicationMapBuilder applicationMapBuilder_parallelAppenders = ApplicationMapBuilderTestHelper.createApplicationMapBuilder(range, parallelExecutor);
    ApplicationMap applicationMap = applicationMapBuilder.includeNodeHistogram(nodeHistogramFactory).includeServerInfo(serverInstanceListFactory).build(linkDataDuplexMap, buildTimeoutMillis);
    ApplicationMap applicationMap_parallelAppenders = applicationMapBuilder_parallelAppenders.includeNodeHistogram(nodeHistogramFactory).includeServerInfo(serverInstanceListFactory).build(linkDataDuplexMap, buildTimeoutMillis);
    Assert.assertTrue(applicationMap.getNodes().isEmpty());
    Assert.assertTrue(applicationMap.getNodes().isEmpty());
    Assert.assertTrue(applicationMap_parallelAppenders.getNodes().isEmpty());
    Assert.assertTrue(applicationMap.getLinks().isEmpty());
    Assert.assertTrue(applicationMap.getLinks().isEmpty());
    Assert.assertTrue(applicationMap_parallelAppenders.getLinks().isEmpty());
    ApplicationMapVerifier verifier = new ApplicationMapVerifier(applicationMap);
    verifier.verify(applicationMap);
    verifier.verify(applicationMap_parallelAppenders);
}
Also used : DefaultNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory) ServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.ServerInstanceListFactory) DefaultServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory) DefaultServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory) LinkDataDuplexMap(com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataDuplexMap) Range(com.navercorp.pinpoint.web.vo.Range) DefaultNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory) NodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory) Test(org.junit.Test)

Aggregations

NodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory)6 DefaultNodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.DefaultNodeHistogramFactory)4 DefaultServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.DefaultServerInstanceListFactory)4 ServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.ServerInstanceListFactory)4 LinkList (com.navercorp.pinpoint.web.applicationmap.link.LinkList)3 NodeList (com.navercorp.pinpoint.web.applicationmap.nodes.NodeList)3 LinkDataDuplexMap (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataDuplexMap)3 EmptyNodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory)2 NodeHistogramAppender (com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramAppender)2 StatisticsServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.StatisticsServerInstanceListFactory)2 Node (com.navercorp.pinpoint.web.applicationmap.nodes.Node)2 NodeType (com.navercorp.pinpoint.web.applicationmap.nodes.NodeType)2 ServerInstanceList (com.navercorp.pinpoint.web.applicationmap.nodes.ServerInstanceList)2 Range (com.navercorp.pinpoint.web.vo.Range)2 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)1 ApplicationMapBuilder (com.navercorp.pinpoint.web.applicationmap.ApplicationMapBuilder)1 MapResponseNodeHistogramDataSource (com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.MapResponseNodeHistogramDataSource)1 WasNodeHistogramDataSource (com.navercorp.pinpoint.web.applicationmap.appender.histogram.datasource.WasNodeHistogramDataSource)1 MetricInfoAppender (com.navercorp.pinpoint.web.applicationmap.appender.metric.MetricInfoAppender)1 EmptyServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.EmptyServerInstanceListFactory)1