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;
}
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());
}
Aggregations