Examples of elapsed()


Examples of com.google.common.base.Stopwatch.elapsed()

            log.warn("There was an unexpected error scheduling aggregation tasks", e);
            taskTracker.abort("There was an unexpected error scheduling aggregation tasks: " + e.getMessage());
        } finally {
            stopwatch.stop();
            log.info("Finished " + schedulesCount + " " + bucket + " data aggregations in " +
                stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
        }
        return schedulesCount.get();
    }

    protected void submitAggregationTask(Batch batch) throws InterruptedException {
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

        catch (AbortedException e) {
            log.warn("Aggregation has been aborted: " + e.getMessage());
            return Collections.emptySet();
        } finally {
            stopwatch.stop();
            totalAggregationTime.addAndGet(stopwatch.elapsed(TimeUnit.MILLISECONDS));
            log.info("Finished aggregation of {\"raw schedules\": " + num1Hour + ", \"1 hour schedules\": " + num6Hour +
                ", \"6 hour schedules\": " + num24Hour + "} in " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
        }
    }
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

            return Collections.emptySet();
        } finally {
            stopwatch.stop();
            totalAggregationTime.addAndGet(stopwatch.elapsed(TimeUnit.MILLISECONDS));
            log.info("Finished aggregation of {\"raw schedules\": " + num1Hour + ", \"1 hour schedules\": " + num6Hour +
                ", \"6 hour schedules\": " + num24Hour + "} in " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
        }
    }

    private DataAggregator createRawAggregator(PersistFunctions persistFunctions, Semaphore permits) {
        DataAggregator aggregator = new DataAggregator();
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

            AggregateNumericMetric summary = metricsServer.getSummaryAggregate(scheduleId, startTime, endTime);

            return new MeasurementAggregate(summary.getMin(), summary.getAvg(), summary.getMax());
        } finally {
            stopwatch.stop();
            log.debug("Finished loading measurement aggregate in " + stopwatch.elapsed(TimeUnit.MILLISECONDS));
        }
    }

    @Override
    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

            }
        } finally {
            stopwatch.stop();
            if (log.isDebugEnabled()) {
                log.debug("Finished calculating resource summary aggregate in " +
                    stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
            }
        }
    }

    public List<MeasurementDataNumericHighLowComposite> findDataForGroup(List<Integer> scheduleIds, long beginTime,
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

        } finally {
            stopwatch.stop();
            if (log.isDebugEnabled()) {
                log.debug("Finished calculating resource summary aggregate for [scheduleId: " + scheduleId +
                    ", beginTime: " + beginTime + ", endTime: " + endTime + "] in " +
                    stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
            }
        }
    }

    public ListenableFuture<AggregateNumericMetric> getSummaryAggregateAsync(int scheduleId, long beginTime,
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

        } finally {
            stopwatch.stop();
            if (log.isDebugEnabled()) {
                log.debug("Finished calculating group summary aggregate for [scheduleIds: " + scheduleIds +
                    ", beginTime: " + beginTime + ", endTime: " + endTime + "] in " +
                    stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
            }
        }
    }

    private List<AggregateNumericMetric> loadMetrics(List<Integer> scheduleIds, long begin, long end, Bucket bucket) {
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

                        callback.onSuccess(data);
                        if (remainingInserts.decrementAndGet() == 0) {
                            stopwatch.stop();
                            if (log.isDebugEnabled()) {
                                log.debug("Finished inserting " + dataSet.size() + " raw metrics in " +
                                    stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
                            }
                            callback.onFinish();
                        }
                    }
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

            findResourceDataForPast2Weeks(random.nextInt(startingSchedule, bound));
            findResourceDataForPast31Days(random.nextInt(startingSchedule, bound));
            findResourceDataForPastYear(random.nextInt(startingSchedule, bound));
        } finally {
            stopwatch.stop();
            log.info("Finished running metrics queries in " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
            context.stop();
        }
    }

    private void findResourceDataForPast24Hours(int scheduleId) {
View Full Code Here

Examples of com.google.common.base.Stopwatch.elapsed()

        final Stopwatch stopwatch = new Stopwatch().start();
        metricsServer.addNumericData(generateData(), new RawDataInsertedCallback() {
            @Override
            public void onFinish() {
                stopwatch.stop();
                log.info("Finished inserting raw data in " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms");
                context.stop();
            }

            @Override
            public void onSuccess(MeasurementDataNumeric result) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.