diff --git a/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ServiceQuery.java b/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ServiceQuery.java index 39b546731163dc3255704b67883e620b33e27694..00c79eb58a1862f243debaa7dc23b57e1e9ad214 100644 --- a/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ServiceQuery.java +++ b/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ServiceQuery.java @@ -81,9 +81,9 @@ public class ServiceQuery implements Query { } public SLATrend getServiceSLATrend(int serviceId, Duration duration) throws ParseException { - long start = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart()); - long end = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd()); - return getServiceNameService().getServiceSLATrend(serviceId, duration.getStep(), start, end); + long startTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getStart()); + long endTimeBucket = DurationUtils.INSTANCE.exchangeToTimeBucket(duration.getEnd()); + return getServiceNameService().getServiceSLATrend(serviceId, duration.getStep(), startTimeBucket, endTimeBucket); } public Topology getServiceTopology(int serviceId, Duration duration) throws ParseException { diff --git a/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceNameService.java b/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceNameService.java index c7a58c3622f9d25f092ed1a56028d0b98ad865df..d587b1bc8662e820a68d2d5c7373088f0985652a 100644 --- a/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceNameService.java +++ b/apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ServiceNameService.java @@ -87,9 +87,9 @@ public class ServiceNameService { return responseTimeTrend; } - public SLATrend getServiceSLATrend(int serviceId, Step step, long start, long end) throws ParseException { + public SLATrend getServiceSLATrend(int serviceId, Step step, long startTimeBucket, long endTimeBucket) throws ParseException { SLATrend slaTrend = new SLATrend(); - List durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, start, end); + List durationPoints = DurationUtils.INSTANCE.getDurationPoints(step, startTimeBucket, endTimeBucket); slaTrend.setTrendList(serviceMetricUIDAO.getServiceSLATrend(serviceId, step, durationPoints)); return slaTrend; }