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