Examples of elapsed()


Examples of com.dbxml.util.Stopwatch.elapsed()

            if ( binary )
               exportBin(col, f, fn, estimate);
            else
               exportDoc(col, f, fn, estimate);
            if ( estimate && i > 0 && i % SAMPLE_SET == 0 ) {
               long t = ((fileCount - i) * sw.elapsed()) / i;
               pw.print("\r" + sw.toString(t) + EOL_STRING);
               pw.flush();
            }
         }
         if ( estimate )
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.guava.base.Stopwatch.elapsed()

      throw new ExecutionException(e);
    } catch (Error e) {
      throw new ExecutionError(e);
    } finally {
      if (!success) {
        globalStatsCounter.recordLoadException(stopwatch.elapsed(NANOSECONDS));
      }
    }

    if (result == null) {
      globalStatsCounter.recordLoadException(stopwatch.elapsed(NANOSECONDS));
View Full Code Here

Examples of com.gainmatrix.lib.time.ChronometerTimer.elapsed()

                boolean succeed = exitCode == definition.getExpectedExitCode();
                return produceSuccessResult(stdOutCapturer, stdErrCapturer, exitCode, succeed);
            }

            // Check timeout
            if ((definition.getTimeoutMs() > 0) && (timer.elapsed() > definition.getTimeoutMs())) {
                return produceTimeoutResult(stdOutCapturer, stdErrCapturer);
            }

            // Make a pause
            try {
View Full Code Here

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

                    .build())
            .build()
            .createInjector();
       
        event.await();
        long elapsed = sw.elapsed(TimeUnit.MILLISECONDS);
        LOG.info("Elapsed: " + elapsed);
        Assert.assertTrue(initCalled.get());
        Assert.assertTrue(shutdownCalled.get());
        Assert.assertTrue(elapsed > 1000);
       
View Full Code Here

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

            Stopwatch s = Stopwatch.createStarted();
            try {
                input.stop();

                LOG.info("Input <{}> closed. Took [{}ms]", input.getUniqueReadableId(), s.elapsed(TimeUnit.MILLISECONDS));
            } catch (Exception e) {
                LOG.error("Unable to stop input <{}> [{}]: " + e.getMessage(), input.getUniqueReadableId(), input.getName());
            } finally {
                s.stop();
            }
View Full Code Here

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

            if (futures.containsKey(periodical)) {
                futures.get(periodical).cancel(false);

                s.stop();
                LOG.info("Shutdown of periodical [{}] complete, took <{}ms>.",
                        periodical.getClass().getCanonicalName(), s.elapsed(TimeUnit.MILLISECONDS));
            } else {
                LOG.error("Could not find periodical [{}] in futures list. Not stopping execution.",
                        periodical.getClass().getCanonicalName());
            }
        }
View Full Code Here

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

                job.execute()// ... blocks until it finishes.
                x.stop();

                jobs.remove(job.getId());

                String msg = "SystemJob <" + job.getId() + "> [" + jobClass + "] finished in " + x.elapsed(TimeUnit.MILLISECONDS) + "ms.";
                LOG.info(msg);
                activityWriter.write(new Activity(msg, SystemJobManager.class));
            }
        });
View Full Code Here

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

        final Stopwatch stopwatch = Stopwatch.createStarted();

        try (final InputStream reader = new URL(url).openConnection().getInputStream();
             final OutputStream writer = new FileOutputStream(jarPath(url, pluginType))) {
            long totalBytesRead = ByteStreams.copy(reader, writer);
            System.out.println("Done. " + totalBytesRead + " bytes read (took " + stopwatch.elapsed(TimeUnit.SECONDS) + "s).");
        }
    }
   
    public static boolean compatible(Set<String> versions) {
        if (versions == null) {
View Full Code Here

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

            }
            final IErlElement parent = (IErlElement) element;
            final boolean result = parent.hasChildrenOfKind(ErlElementKind.EXTERNAL_ROOT,
                    ErlElementKind.EXTERNAL_APP, ErlElementKind.EXTERNAL_FOLDER,
                    ErlElementKind.MODULE);
            if (clock.elapsed(TimeUnit.MILLISECONDS) > 100) {
                ErlLogger.debug("TIME open " + element.getClass() + " " + element + "  "
                        + clock.elapsed(TimeUnit.MILLISECONDS) + " ms");
            }
            return result;
        }
View Full Code Here

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

            final boolean result = parent.hasChildrenOfKind(ErlElementKind.EXTERNAL_ROOT,
                    ErlElementKind.EXTERNAL_APP, ErlElementKind.EXTERNAL_FOLDER,
                    ErlElementKind.MODULE);
            if (clock.elapsed(TimeUnit.MILLISECONDS) > 100) {
                ErlLogger.debug("TIME open " + element.getClass() + " " + element + "  "
                        + clock.elapsed(TimeUnit.MILLISECONDS) + " ms");
            }
            return result;
        }
        return false;
    }
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.