Search in sources :

Example 1 with TotalThreadCountBo

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

the class TFTotalThreadCountMapper method build.

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

Example 2 with TotalThreadCountBo

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

the class GrpcTotalThreadCountBoMapper method map.

@Override
public void map(AgentStatBo.Builder.StatBuilder builder, PAgentStat agentStat) {
    // totalThreadCount
    if (agentStat.hasTotalThread()) {
        final PTotalThread totalThread = agentStat.getTotalThread();
        final TotalThreadCountBo totalThreadCountBo = this.map(totalThread);
        builder.addTotalThreadCount(totalThreadCountBo);
    }
}
Also used : TotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo) PTotalThread(com.navercorp.pinpoint.grpc.trace.PTotalThread)

Example 3 with TotalThreadCountBo

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

the class ThriftTotalThreadCountBoMapper method map.

@Override
public TotalThreadCountBo map(TTotalThreadCount thriftObject) {
    TotalThreadCountBo totalThreadCountBo = new TotalThreadCountBo();
    totalThreadCountBo.setTotalThreadCount(thriftObject.getTotalThreadCount());
    return totalThreadCountBo;
}
Also used : TotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo)

Example 4 with TotalThreadCountBo

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

the class HBaseSampledTotalThreadCountDaoV2 method getSampledAgentStatList.

@Override
public List<SampledTotalThreadCount> getSampledAgentStatList(String agentId, TimeWindow timeWindow) {
    long scanFrom = timeWindow.getWindowRange().getFrom();
    long scanTo = timeWindow.getWindowRange().getTo() + timeWindow.getWindowSlotSize();
    Range range = Range.newRange(scanFrom, scanTo);
    AgentStatMapperV2<TotalThreadCountBo> mapper = operations.createRowMapper(totalThreadCountDecoder, range);
    SampledAgentStatResultExtractor<TotalThreadCountBo, SampledTotalThreadCount> resultExtractor = new SampledAgentStatResultExtractor<>(timeWindow, mapper, totalThreadCountSampler);
    return operations.getSampledAgentStatList(AgentStatType.TOTAL_THREAD, resultExtractor, agentId, range);
}
Also used : SampledAgentStatResultExtractor(com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor) Range(com.navercorp.pinpoint.web.vo.Range) TotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo) SampledTotalThreadCount(com.navercorp.pinpoint.web.vo.stat.SampledTotalThreadCount)

Example 5 with TotalThreadCountBo

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

the class TFTotalThreadCountMapperTest method mapTest.

@Test
public void mapTest() {
    TFTotalThreadCountMapper mapper = new TFTotalThreadCountMapper();
    TotalThreadCountBo totalThreadCountBo = new TotalThreadCountBo();
    totalThreadCountBo.setTotalThreadCount(50);
    TFTotalThreadCount tfTotalThreadCount = mapper.map(totalThreadCountBo);
    assertEquals(tfTotalThreadCount.getTotalThreadCount(), 50);
}
Also used : TotalThreadCountBo(com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo) TFTotalThreadCount(com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount) Test(org.junit.Test)

Aggregations

TotalThreadCountBo (com.navercorp.pinpoint.common.server.bo.stat.TotalThreadCountBo)7 AgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.AgentStatBo)2 PTotalThread (com.navercorp.pinpoint.grpc.trace.PTotalThread)1 TFTotalThreadCount (com.navercorp.pinpoint.thrift.dto.flink.TFTotalThreadCount)1 SampledAgentStatResultExtractor (com.navercorp.pinpoint.web.mapper.stat.SampledAgentStatResultExtractor)1 Range (com.navercorp.pinpoint.web.vo.Range)1 SampledTotalThreadCount (com.navercorp.pinpoint.web.vo.stat.SampledTotalThreadCount)1 Test (org.junit.Test)1