Search in sources :

Example 1 with AgentEventMarker

use of com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventMarker in project pinpoint by naver.

the class AgentEventMarkerSerializerTest method makeData.

private AgentEventMarker makeData() {
    AgentEventMarker marker = new AgentEventMarker();
    for (int i = 0; i < 3; i++) {
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_CONNECTED)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_PING)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_SHUTDOWN)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_UNEXPECTED_SHUTDOWN)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_CLOSED_BY_SERVER)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_UNEXPECTED_CLOSE_BY_SERVER)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.AGENT_DEADLOCK_DETECTED)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.USER_THREAD_DUMP)));
        marker.addAgentEvent(new AgentEvent(new AgentEventBo("agent", 1000L, 1001L, AgentEventType.OTHER)));
    }
    return marker;
}
Also used : AgentEventBo(com.navercorp.pinpoint.common.server.bo.event.AgentEventBo) AgentEvent(com.navercorp.pinpoint.web.vo.AgentEvent) AgentEventMarker(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventMarker)

Example 2 with AgentEventMarker

use of com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventMarker in project pinpoint by naver.

the class AgentEventMarkerSerializerTest method serializeTest.

@Test
public void serializeTest() throws Exception {
    AgentEventMarker marker = makeData();
    String jsonValue = mapper.writeValueAsString(marker);
    Map map = mapper.readValue(jsonValue, Map.class);
    Assert.assertEquals(27, map.get("totalCount"));
    logger.debug(map.get("typeCounts").toString());
}
Also used : Map(java.util.Map) AgentEventMarker(com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventMarker) Test(org.junit.Test)

Aggregations

AgentEventMarker (com.navercorp.pinpoint.web.vo.timeline.inspector.AgentEventMarker)2 AgentEventBo (com.navercorp.pinpoint.common.server.bo.event.AgentEventBo)1 AgentEvent (com.navercorp.pinpoint.web.vo.AgentEvent)1 Map (java.util.Map)1 Test (org.junit.Test)1