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