Search in sources :

Example 6 with LinkList

use of com.navercorp.pinpoint.web.applicationmap.link.LinkList in project pinpoint by naver.

the class ApplicationMapBuilder method build.

public ApplicationMap build(Application application, long timeoutMillis) {
    logger.info("Building empty application map");
    NodeList nodeList = new NodeList();
    LinkList emptyLinkList = new LinkList();
    NodeType nodeType = this.nodeType;
    if (nodeType == null) {
        nodeType = NodeType.DETAILED;
    }
    Node node = new Node(nodeType, application);
    if (serverInstanceListFactory != null) {
        ServerInstanceList runningInstances = serverInstanceListFactory.createWasNodeInstanceList(node, range.getTo());
        if (runningInstances.getInstanceCount() > 0) {
            node.setServerInstanceList(runningInstances);
            nodeList.addNode(node);
        }
    }
    NodeHistogramFactory nodeHistogramFactory = this.nodeHistogramFactory;
    if (nodeHistogramFactory == null) {
        nodeHistogramFactory = new EmptyNodeHistogramFactory();
    }
    NodeHistogramAppender nodeHistogramAppender = nodeHistogramAppenderFactory.create(nodeHistogramFactory);
    nodeHistogramAppender.appendNodeHistogram(range, nodeList, emptyLinkList, timeoutMillis);
    return new DefaultApplicationMap(range, nodeList, emptyLinkList);
}
Also used : NodeHistogramAppender(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramAppender) NodeList(com.navercorp.pinpoint.web.applicationmap.nodes.NodeList) NodeType(com.navercorp.pinpoint.web.applicationmap.nodes.NodeType) Node(com.navercorp.pinpoint.web.applicationmap.nodes.Node) ServerInstanceList(com.navercorp.pinpoint.web.applicationmap.nodes.ServerInstanceList) EmptyNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory) LinkList(com.navercorp.pinpoint.web.applicationmap.link.LinkList) EmptyNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory) NodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory)

Example 7 with LinkList

use of com.navercorp.pinpoint.web.applicationmap.link.LinkList in project pinpoint by naver.

the class ApplicationMapBuilder method build.

public ApplicationMap build(LinkDataDuplexMap linkDataDuplexMap, long timeoutMillis) {
    Objects.requireNonNull(linkDataDuplexMap, "linkDataDuplexMap");
    logger.info("Building application map");
    NodeType nodeType = this.nodeType;
    if (nodeType == null) {
        nodeType = NodeType.DETAILED;
    }
    LinkType linkType = this.linkType;
    if (linkType == null) {
        linkType = LinkType.DETAILED;
    }
    NodeList nodeList = NodeListFactory.createNodeList(nodeType, linkDataDuplexMap);
    LinkList linkList = LinkListFactory.createLinkList(linkType, nodeList, linkDataDuplexMap, range);
    NodeHistogramFactory nodeHistogramFactory = this.nodeHistogramFactory;
    if (nodeHistogramFactory == null) {
        nodeHistogramFactory = new EmptyNodeHistogramFactory();
    }
    NodeHistogramAppender nodeHistogramAppender = nodeHistogramAppenderFactory.create(nodeHistogramFactory);
    final TimeoutWatcher timeoutWatcher = new TimeoutWatcher(timeoutMillis);
    nodeHistogramAppender.appendNodeHistogram(range, nodeList, linkList, timeoutWatcher.remainingTimeMillis());
    ServerInstanceListFactory serverInstanceListFactory = this.serverInstanceListFactory;
    if (serverInstanceListFactory == null) {
        serverInstanceListFactory = new EmptyServerInstanceListFactory();
    }
    ServerInfoAppender serverInfoAppender = serverInfoAppenderFactory.create(serverInstanceListFactory);
    serverInfoAppender.appendServerInfo(range, nodeList, linkDataDuplexMap, timeoutWatcher.remainingTimeMillis());
    MetricInfoAppender metricInfoAppender = metricInfoAppenderFactory.create();
    metricInfoAppender.appendMetricInfo(range, nodeList, linkDataDuplexMap);
    return new DefaultApplicationMap(range, nodeList, linkList);
}
Also used : ServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.ServerInstanceListFactory) EmptyServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.EmptyServerInstanceListFactory) NodeHistogramAppender(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramAppender) NodeList(com.navercorp.pinpoint.web.applicationmap.nodes.NodeList) EmptyServerInstanceListFactory(com.navercorp.pinpoint.web.applicationmap.appender.server.EmptyServerInstanceListFactory) EmptyNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory) NodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory) NodeType(com.navercorp.pinpoint.web.applicationmap.nodes.NodeType) EmptyNodeHistogramFactory(com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory) LinkType(com.navercorp.pinpoint.web.applicationmap.link.LinkType) LinkList(com.navercorp.pinpoint.web.applicationmap.link.LinkList) ServerInfoAppender(com.navercorp.pinpoint.web.applicationmap.appender.server.ServerInfoAppender) MetricInfoAppender(com.navercorp.pinpoint.web.applicationmap.appender.metric.MetricInfoAppender)

Example 8 with LinkList

use of com.navercorp.pinpoint.web.applicationmap.link.LinkList in project pinpoint by naver.

the class ApplicationMapTest method root.

@Test
public void root() throws IOException {
    ApplicationMap app = new DefaultApplicationMap(Range.newRange(0, 1), new NodeList(), new LinkList());
    String s = MAPPER.writeValueAsString(app);
    logger.debug(s);
}
Also used : NodeList(com.navercorp.pinpoint.web.applicationmap.nodes.NodeList) LinkList(com.navercorp.pinpoint.web.applicationmap.link.LinkList) Test(org.junit.Test)

Example 9 with LinkList

use of com.navercorp.pinpoint.web.applicationmap.link.LinkList in project pinpoint by naver.

the class LinkListTest method createTomcatToBlocLink.

private Link createTomcatToBlocLink() {
    LinkList linkList = new LinkList();
    Node from = new Node(new Application("from", TOMCAT));
    Node to = new Node(new Application("to", BLOC));
    Link link = new Link(CreateType.Source, from, to, Range.newRange(0, 0));
    return link;
}
Also used : Node(com.navercorp.pinpoint.web.applicationmap.nodes.Node) LinkList(com.navercorp.pinpoint.web.applicationmap.link.LinkList) Application(com.navercorp.pinpoint.web.vo.Application) Link(com.navercorp.pinpoint.web.applicationmap.link.Link)

Example 10 with LinkList

use of com.navercorp.pinpoint.web.applicationmap.link.LinkList in project pinpoint by naver.

the class LinkListTest method createTomcatToTomcatLink.

private Link createTomcatToTomcatLink() {
    LinkList linkList = new LinkList();
    Node from = new Node(new Application("from", TOMCAT));
    Node to = new Node(new Application("to", TOMCAT));
    Link link = new Link(CreateType.Source, from, to, Range.newRange(0, 0));
    return link;
}
Also used : Node(com.navercorp.pinpoint.web.applicationmap.nodes.Node) LinkList(com.navercorp.pinpoint.web.applicationmap.link.LinkList) Application(com.navercorp.pinpoint.web.vo.Application) Link(com.navercorp.pinpoint.web.applicationmap.link.Link)

Aggregations

LinkList (com.navercorp.pinpoint.web.applicationmap.link.LinkList)20 Test (org.junit.Test)13 Link (com.navercorp.pinpoint.web.applicationmap.link.Link)12 NodeList (com.navercorp.pinpoint.web.applicationmap.nodes.NodeList)11 Node (com.navercorp.pinpoint.web.applicationmap.nodes.Node)9 NodeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.NodeHistogram)6 Range (com.navercorp.pinpoint.web.vo.Range)6 Application (com.navercorp.pinpoint.web.vo.Application)5 HistogramSlot (com.navercorp.pinpoint.common.trace.HistogramSlot)4 Histogram (com.navercorp.pinpoint.web.applicationmap.histogram.Histogram)4 NodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramFactory)3 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)2 EmptyNodeHistogramFactory (com.navercorp.pinpoint.web.applicationmap.appender.histogram.EmptyNodeHistogramFactory)2 NodeHistogramAppender (com.navercorp.pinpoint.web.applicationmap.appender.histogram.NodeHistogramAppender)2 ServerInstanceListFactory (com.navercorp.pinpoint.web.applicationmap.appender.server.ServerInstanceListFactory)2 NodeType (com.navercorp.pinpoint.web.applicationmap.nodes.NodeType)2 ServerInstanceList (com.navercorp.pinpoint.web.applicationmap.nodes.ServerInstanceList)2 LinkDataDuplexMap (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkDataDuplexMap)2 LinkSelector (com.navercorp.pinpoint.web.service.map.LinkSelector)2 DestinationApplicationFilter (com.navercorp.pinpoint.web.service.map.processor.DestinationApplicationFilter)2