Search in sources :

Example 26 with TimeHistogram

use of com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram in project pinpoint by naver.

the class AgentHistogram method addTimeHistogram.

public void addTimeHistogram(TimeHistogram timeHistogram) {
    TimeHistogram find = this.timeHistogramMap.get(timeHistogram.getTimeStamp());
    if (find == null) {
        find = new TimeHistogram(agentId.getServiceType(), timeHistogram.getTimeStamp());
        this.timeHistogramMap.put(timeHistogram.getTimeStamp(), find);
    }
    find.add(timeHistogram);
}
Also used : TimeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram)

Example 27 with TimeHistogram

use of com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram in project pinpoint by naver.

the class LinkCallData method addCallData.

public void addCallData(long timestamp, short slot, long count) {
    TimeHistogram histogram = getTimeHistogram(timestamp);
    histogram.addCallCount(slot, count);
}
Also used : TimeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram)

Example 28 with TimeHistogram

use of com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram in project pinpoint by naver.

the class MapStatisticsCallerDataCollector method getCountRate.

public long getCountRate(String calleName, DataCategory dataCategory) {
    final LinkCallData linkCallData = calleeStatMap.get(calleName);
    if (linkCallData == null) {
        return 0;
    }
    long count = 0;
    long totalCount = 0;
    switch(dataCategory) {
        case SLOW_RATE:
            for (TimeHistogram timeHistogram : linkCallData.getTimeHistogram()) {
                count += timeHistogram.getSlowCount();
                count += timeHistogram.getVerySlowCount();
                totalCount += timeHistogram.getTotalCount();
            }
            break;
        case ERROR_RATE:
            for (TimeHistogram timeHistogram : linkCallData.getTimeHistogram()) {
                count += timeHistogram.getTotalErrorCount();
                totalCount += timeHistogram.getTotalCount();
            }
            break;
        default:
            throw new IllegalArgumentException("Can't calculate rate for " + dataCategory);
    }
    return calculatePercent(count, totalCount);
}
Also used : TimeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram) LinkCallData(com.navercorp.pinpoint.web.applicationmap.rawdata.LinkCallData)

Example 29 with TimeHistogram

use of com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram in project pinpoint by naver.

the class ResponseTimeDataCollector method sum.

private void sum(Collection<TimeHistogram> timeHistograms) {
    for (TimeHistogram timeHistogram : timeHistograms) {
        slowCount += timeHistogram.getSlowCount();
        slowCount += timeHistogram.getVerySlowCount();
        errorCount += timeHistogram.getTotalErrorCount();
        totalCount += timeHistogram.getTotalCount();
    }
}
Also used : TimeHistogram(com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram)

Aggregations

TimeHistogram (com.navercorp.pinpoint.web.applicationmap.histogram.TimeHistogram)29 LinkCallData (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkCallData)8 Application (com.navercorp.pinpoint.web.vo.Application)5 LinkKey (com.navercorp.pinpoint.web.vo.LinkKey)4 Test (org.junit.Test)4 LinkCallDataMap (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkCallDataMap)2 LinkData (com.navercorp.pinpoint.web.applicationmap.rawdata.LinkData)2 HashMap (java.util.HashMap)2 AcceptApplication (com.navercorp.pinpoint.web.service.map.AcceptApplication)1 RpcApplication (com.navercorp.pinpoint.web.service.map.RpcApplication)1