1. Change the parameter name:
Start -> startTimeBucket End -> endTimeBucket
This commit is contained in:
parent
45a718de46
commit
48981e87f2
|
|
@ -71,26 +71,26 @@ public class ServerQuery implements Query {
|
|||
}
|
||||
|
||||
public ThroughputTrend getServerTPSTrend(int serverId, Duration duration) throws ParseException {
|
||||
long start = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long end = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getServerTPSTrend(serverId, duration.getStep(), start, end);
|
||||
long startTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long endTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getServerTPSTrend(serverId, duration.getStep(), startTimeBucket, endTimeBucket);
|
||||
}
|
||||
|
||||
public CPUTrend getCPUTrend(int serverId, Duration duration) throws ParseException {
|
||||
long start = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long end = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getCPUTrend(serverId, duration.getStep(), start, end);
|
||||
long startTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long endTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getCPUTrend(serverId, duration.getStep(), startTimeBucket, endTimeBucket);
|
||||
}
|
||||
|
||||
public GCTrend getGCTrend(int serverId, Duration duration) throws ParseException {
|
||||
long start = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long end = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getGCTrend(serverId, duration.getStep(), start, end);
|
||||
long startTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long endTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getGCTrend(serverId, duration.getStep(), startTimeBucket, endTimeBucket);
|
||||
}
|
||||
|
||||
public MemoryTrend getMemoryTrend(int serverId, Duration duration) throws ParseException {
|
||||
long start = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long end = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getMemoryTrend(serverId, duration.getStep(), start, end);
|
||||
long startTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart());
|
||||
long endTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd());
|
||||
return getServerService().getMemoryTrend(serverId, duration.getStep(), startTimeBucket, endTimeBucket);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,25 +117,28 @@ public class ServerService {
|
|||
return serverThroughput;
|
||||
}
|
||||
|
||||
public ThroughputTrend getServerTPSTrend(int instanceId, Step step, long start, long end) throws ParseException {
|
||||
public ThroughputTrend getServerTPSTrend(int instanceId, Step step, long startTimeBucket,
|
||||
long endTimeBucket) throws ParseException {
|
||||
ThroughputTrend throughputTrend = new ThroughputTrend();
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, start, end);
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, startTimeBucket, endTimeBucket);
|
||||
List<Integer> trends = instanceMetricUIDAO.getServerTPSTrend(instanceId, step, durationPoints);
|
||||
throughputTrend.setTrendList(trends);
|
||||
return throughputTrend;
|
||||
}
|
||||
|
||||
public CPUTrend getCPUTrend(int instanceId, Step step, long start, long end) throws ParseException {
|
||||
public CPUTrend getCPUTrend(int instanceId, Step step, long startTimeBucket,
|
||||
long endTimeBucket) throws ParseException {
|
||||
CPUTrend cpuTrend = new CPUTrend();
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, start, end);
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, startTimeBucket, endTimeBucket);
|
||||
List<Integer> trends = cpuMetricUIDAO.getCPUTrend(instanceId, step, durationPoints);
|
||||
cpuTrend.setCost(trends);
|
||||
return cpuTrend;
|
||||
}
|
||||
|
||||
public GCTrend getGCTrend(int instanceId, Step step, long start, long end) throws ParseException {
|
||||
public GCTrend getGCTrend(int instanceId, Step step, long startTimeBucket,
|
||||
long endTimeBucket) throws ParseException {
|
||||
GCTrend gcTrend = new GCTrend();
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, start, end);
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, startTimeBucket, endTimeBucket);
|
||||
List<Integer> youngGCTrend = gcMetricUIDAO.getYoungGCTrend(instanceId, step, durationPoints);
|
||||
gcTrend.setYoungGC(youngGCTrend);
|
||||
List<Integer> oldGCTrend = gcMetricUIDAO.getOldGCTrend(instanceId, step, durationPoints);
|
||||
|
|
@ -143,9 +146,9 @@ public class ServerService {
|
|||
return gcTrend;
|
||||
}
|
||||
|
||||
public MemoryTrend getMemoryTrend(int instanceId, Step step, long start, long end) throws ParseException {
|
||||
public MemoryTrend getMemoryTrend(int instanceId, Step step, long startTimeBucket, long endTimeBucket) throws ParseException {
|
||||
MemoryTrend memoryTrend = new MemoryTrend();
|
||||
List<DurationPoint> durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, start, end);
|
||||
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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue