Search in sources :

Example 1 with MemoryTrend

use of org.apache.skywalking.apm.collector.storage.ui.server.MemoryTrend in project incubator-skywalking by apache.

the class ServerService method getMemoryTrend.

public MemoryTrend getMemoryTrend(int instanceId, Step step, long startTimeBucket, long endTimeBucket) throws ParseException {
    MemoryTrend memoryTrend = new MemoryTrend();
    List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, startTimeBucket, endTimeBucket);
    IMemoryMetricUIDAO.Trend heapMemoryTrend = memoryMetricUIDAO.getHeapMemoryTrend(instanceId, step, durationPoints);
    memoryTrend.setHeap(heapMemoryTrend.getMetrics());
    memoryTrend.setMaxHeap(heapMemoryTrend.getMaxMetrics());
    IMemoryMetricUIDAO.Trend noHeapMemoryTrend = memoryMetricUIDAO.getNoHeapMemoryTrend(instanceId, step, durationPoints);
    memoryTrend.setNoheap(noHeapMemoryTrend.getMetrics());
    memoryTrend.setMaxNoheap(noHeapMemoryTrend.getMaxMetrics());
    return memoryTrend;
}
Also used : MemoryTrend(org.apache.skywalking.apm.collector.storage.ui.server.MemoryTrend) DurationPoint(org.apache.skywalking.apm.collector.storage.utils.DurationPoint) IMemoryMetricUIDAO(org.apache.skywalking.apm.collector.storage.dao.ui.IMemoryMetricUIDAO)

Aggregations

IMemoryMetricUIDAO (org.apache.skywalking.apm.collector.storage.dao.ui.IMemoryMetricUIDAO)1 MemoryTrend (org.apache.skywalking.apm.collector.storage.ui.server.MemoryTrend)1 DurationPoint (org.apache.skywalking.apm.collector.storage.utils.DurationPoint)1