Search in sources :

Example 21 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class JoinResponseTimeSamplerTest method sampleDataPoints2Test.

@Test
public void sampleDataPoints2Test() {
    long currentTime = 1487149800000L;
    JoinResponseTimeSampler joinResponseTimeSampler = new JoinResponseTimeSampler();
    List<JoinResponseTimeBo> joinResponseTimeBoList = new ArrayList<JoinResponseTimeBo>();
    AggreJoinResponseTimeBo aggreJoinResponseTimeBo = joinResponseTimeSampler.sampleDataPoints(1, currentTime, joinResponseTimeBoList, JoinResponseTimeBo.EMPTY_JOIN_RESPONSE_TIME_BO);
    assertEquals(aggreJoinResponseTimeBo.getId(), JoinResponseTimeBo.UNKNOWN_ID);
    assertEquals(aggreJoinResponseTimeBo.getTimestamp(), 1487149800000L);
    assertEquals(aggreJoinResponseTimeBo.getResponseTimeJoinValue(), new JoinLongFieldBo(JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNKNOWN_AGENT, JoinResponseTimeBo.UNCOLLECTED_VALUE, JoinResponseTimeBo.UNKNOWN_AGENT));
}
Also used : JoinResponseTimeBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) AggreJoinResponseTimeBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinResponseTimeBo) ArrayList(java.util.ArrayList) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Example 22 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class JoinTransactionSamplerTest method sampleDataPointsTest.

@Test
public void sampleDataPointsTest() {
    long currentTime = 1487149800000L;
    JoinTransactionSampler joinTransactionSampler = new JoinTransactionSampler();
    List<JoinTransactionBo> joinTransactionBoList = createJoinTransactionBoList(currentTime);
    AggreJoinTransactionBo aggreJoinTransactionBo = joinTransactionSampler.sampleDataPoints(1, currentTime, joinTransactionBoList, JoinTransactionBo.EMPTY_JOIN_TRANSACTION_BO);
    assertEquals(aggreJoinTransactionBo.getId(), "test_app");
    assertEquals(aggreJoinTransactionBo.getCollectInterval(), 5000);
    assertEquals(aggreJoinTransactionBo.getTotalCountJoinValue(), new JoinLongFieldBo(130l, 10l, "app_1_1", 560l, "app_4_2"));
    assertEquals(aggreJoinTransactionBo.getTimestamp(), 1487149800000L);
}
Also used : AggreJoinTransactionBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinTransactionBo) JoinTransactionBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo) AggreJoinTransactionBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinTransactionBo) JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo) Test(org.junit.Test)

Example 23 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class ApplicationMemoryChartGroupTest method testHeap.

private void testHeap(DoubleApplicationStatPoint memoryPoint, AggreJoinMemoryBo aggreJoinMemoryBo) {
    final JoinLongFieldBo heapUsedJoinValue = aggreJoinMemoryBo.getHeapUsedJoinValue();
    assertEquals(memoryPoint.getYValForAvg(), heapUsedJoinValue.getAvg(), 0);
    assertEquals(memoryPoint.getYValForMin(), heapUsedJoinValue.getMin(), 0);
    assertEquals(memoryPoint.getYValForMax(), heapUsedJoinValue.getMax(), 0);
    assertEquals(memoryPoint.getAgentIdForMin(), heapUsedJoinValue.getMinAgentId());
    assertEquals(memoryPoint.getAgentIdForMax(), heapUsedJoinValue.getMaxAgentId());
}
Also used : JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Example 24 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class ApplicationDirectBufferChartGroupTest method testMappedMemoryUsed.

private void testMappedMemoryUsed(LongApplicationStatPoint directBufferPoint, AggreJoinDirectBufferBo aggreJoinDirectBufferBo) {
    final JoinLongFieldBo mappedMemoryUsedJoinValue = aggreJoinDirectBufferBo.getMappedMemoryUsedJoinValue();
    assertEquals(directBufferPoint.getXVal(), aggreJoinDirectBufferBo.getTimestamp());
    assertEquals(directBufferPoint.getYValForAvg(), mappedMemoryUsedJoinValue.getAvg(), 0);
    assertEquals(directBufferPoint.getYValForMin(), mappedMemoryUsedJoinValue.getMin(), 0);
    assertEquals(directBufferPoint.getYValForMax(), mappedMemoryUsedJoinValue.getMax(), 0);
    assertEquals(directBufferPoint.getAgentIdForMin(), mappedMemoryUsedJoinValue.getMinAgentId());
    assertEquals(directBufferPoint.getAgentIdForMax(), mappedMemoryUsedJoinValue.getMaxAgentId());
}
Also used : JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Example 25 with JoinLongFieldBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo in project pinpoint by naver.

the class ApplicationLoadedClassChartGroupTest method testLoadedCLass.

private void testLoadedCLass(LongApplicationStatPoint point, AggreJoinLoadedClassBo loadedClassBo) {
    final JoinLongFieldBo loadedClass = loadedClassBo.getLoadedClassJoinValue();
    assertEquals(point.getXVal(), loadedClassBo.getTimestamp());
    assertEquals(point.getYValForAvg(), loadedClass.getAvg(), 0);
    assertEquals(point.getYValForMin(), loadedClass.getMin(), 0);
    assertEquals(point.getYValForMax(), loadedClass.getMax(), 0);
    assertEquals(point.getAgentIdForMin(), loadedClass.getMinAgentId());
    assertEquals(point.getAgentIdForMax(), loadedClass.getMaxAgentId());
}
Also used : JoinLongFieldBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)

Aggregations

JoinLongFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo)54 ArrayList (java.util.ArrayList)18 Test (org.junit.Test)18 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)10 AgentStatHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.AgentStatHeaderDecoder)8 BitCountingHeaderDecoder (com.navercorp.pinpoint.common.server.bo.codec.stat.header.BitCountingHeaderDecoder)8 JoinLongFieldEncodingStrategy (com.navercorp.pinpoint.common.server.bo.codec.stat.strategy.JoinLongFieldEncodingStrategy)8 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)8 JoinResponseTimeBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinResponseTimeBo)7 JoinTransactionBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTransactionBo)7 JoinDirectBufferBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinDirectBufferBo)6 JoinLoadedClassBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinLoadedClassBo)6 JoinTotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinTotalThreadCountBo)6 JoinMemoryBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinMemoryBo)5 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)4 JoinFileDescriptorBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinFileDescriptorBo)4 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)4 Date (java.util.Date)4 TFResponseTime (com.navercorp.pinpoint.thrift.dto.flink.TFResponseTime)3 TFTransaction (com.navercorp.pinpoint.thrift.dto.flink.TFTransaction)3