Search in sources :

Example 1 with LoadedClassBo

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

the class TFAgentStatMapperTest method createLoadedClassCountBoList.

private AgentStatBo createLoadedClassCountBoList() {
    AgentStatBo.Builder builder = newBuilder();
    LoadedClassBo loadedClassBo1 = new LoadedClassBo();
    loadedClassBo1.setLoadedClassCount(4);
    loadedClassBo1.setUnloadedClassCount(4);
    AgentStatBo.Builder.StatBuilder statBuilder1 = builder.newStatBuilder(collectTime1st);
    statBuilder1.addLoadedClass(loadedClassBo1);
    LoadedClassBo loadedClassBo2 = new LoadedClassBo();
    loadedClassBo2.setLoadedClassCount(5);
    loadedClassBo2.setUnloadedClassCount(5);
    AgentStatBo.Builder.StatBuilder statBuilder2 = builder.newStatBuilder(collectTime2nd);
    statBuilder2.addLoadedClass(loadedClassBo2);
    LoadedClassBo loadedClassBo3 = new LoadedClassBo();
    loadedClassBo3.setLoadedClassCount(6);
    loadedClassBo3.setUnloadedClassCount(6);
    AgentStatBo.Builder.StatBuilder statBuilder3 = builder.newStatBuilder(collectTime3rd);
    statBuilder3.addLoadedClass(loadedClassBo3);
    return builder.build();
}
Also used : AgentStatBo(com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo) LoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo)

Example 2 with LoadedClassBo

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

the class TFLoadedClassCountMapperTest method mapTest.

@Test
public void mapTest() {
    TFLoadedClassMapper mapper = new TFLoadedClassMapper();
    LoadedClassBo loadedClassBo = new LoadedClassBo();
    loadedClassBo.setLoadedClassCount(50);
    loadedClassBo.setUnloadedClassCount(50);
    TFLoadedClass tfLoadedClass = mapper.map(loadedClassBo);
    assertEquals(tfLoadedClass.getLoadedClassCount(), 50);
    assertEquals(tfLoadedClass.getUnloadedClassCount(), 50);
}
Also used : LoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo) TFLoadedClass(com.navercorp.pinpoint.thrift.dto.flink.TFLoadedClass) Test(org.junit.Test)

Example 3 with LoadedClassBo

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

the class LoadedClassSampler method sampleDataPoints.

@Override
public SampledLoadedClassCount sampleDataPoints(int timeWindowIndex, long timestamp, List<LoadedClassBo> dataPoints, LoadedClassBo previousDataPoint) {
    final AgentStatPoint<Long> loadedClassCount = newAgentStatPoint(timestamp, dataPoints, LoadedClassBo::getLoadedClassCount);
    final AgentStatPoint<Long> unloadedClassCount = newAgentStatPoint(timestamp, dataPoints, LoadedClassBo::getUnloadedClassCount);
    SampledLoadedClassCount sampledLoadedClassCount = new SampledLoadedClassCount(loadedClassCount, unloadedClassCount);
    return sampledLoadedClassCount;
}
Also used : LoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo) SampledLoadedClassCount(com.navercorp.pinpoint.web.vo.stat.SampledLoadedClassCount)

Example 4 with LoadedClassBo

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

the class TFLoadedClassMapper method build.

@Override
public void build(TFAgentStatMapper.TFAgentStatBuilder builder) {
    AgentStatBo agentStat = builder.getAgentStat();
    List<LoadedClassBo> loadedClassList = agentStat.getLoadedClassBos();
    builder.build(loadedClassList, this);
}
Also used : AgentStatBo(com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo) LoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo)

Example 5 with LoadedClassBo

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

the class GrpcLoadedClassBoMapper method map.

public LoadedClassBo map(final PLoadedClass loadedClass) {
    final LoadedClassBo loadedClassBo = new LoadedClassBo();
    loadedClassBo.setLoadedClassCount(loadedClass.getLoadedClassCount());
    loadedClassBo.setUnloadedClassCount(loadedClass.getUnloadedClassCount());
    return loadedClassBo;
}
Also used : LoadedClassBo(com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo)

Aggregations

LoadedClassBo (com.navercorp.pinpoint.common.server.bo.stat.LoadedClassBo)8 AgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo)2 SampledLoadedClassCount (com.navercorp.pinpoint.web.vo.stat.SampledLoadedClassCount)2 PLoadedClass (com.navercorp.pinpoint.grpc.trace.PLoadedClass)1 TFLoadedClass (com.navercorp.pinpoint.thrift.dto.flink.TFLoadedClass)1 SampledAgentStatResultExtractor (com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor)1 Range (com.navercorp.pinpoint.web.vo.Range)1 Test (org.junit.Test)1