@Override public void start() { // for example from unit testing we want to start Camel later (manually) if (Boolean.TRUE.equals(NO_START.get())) { LOG.trace("Ignoring start() as NO_START is false"); return; } if (!isStarted() && !isStarting()) { try { StopWatch watch = new StopWatch(); super.start(); LOG.debug("start() took {} millis", watch.stop()); } catch (Exception e) { throw wrapRuntimeCamelException(e); } } else { // ignore as Camel is already started LOG.trace("Ignoring start() as Camel is already started"); } }
@Override public void afterPropertiesSet() throws Exception { StopWatch watch = new StopWatch(); super.afterPropertiesSet(); Boolean shutdownEager = CamelContextHelper.parseBoolean(getContext(), getShutdownEager()); if (shutdownEager != null) { LOG.debug("Using shutdownEager: {}", shutdownEager); getContext().setShutdownEager(shutdownEager); } LOG.debug("afterPropertiesSet() took {} millis", watch.stop()); }
public static void main(String[] args) { LoanBrokerWS loanBroker = getProxy(url); StopWatch watch = new StopWatch(); String result = loanBroker.getLoanQuote("SSN", 5000.00, 24); System.out.println("Took " + watch.stop() + " milliseconds to call the loan broker service"); System.out.println(result); }
StopWatch watch = new StopWatch(); int timeout = endpoint.getSendTimeout(); while (!futures.isEmpty() && watch.taken() < timeout) {
@ManagedAttribute(description = "Summary of last FTP activity (download only)") public String getLastFtpActivity() { FTPClient client = getOperations().getFtpClient(); FtpClientActivityListener listener = (FtpClientActivityListener) client.getCopyStreamListener(); if (listener != null) { String log = listener.getLastLogActivity(); if (log != null) { long since = listener.getLastLogActivityTimestamp(); if (since > 0) { StopWatch watch = new StopWatch(new Date(since)); long delta = watch.taken(); String human = TimeUtils.printDuration(delta); return log + " " + human + " ago"; } else { return log; } } } return null; }
StopWatch watch = new StopWatch(); long startTime = new Date().getTime();
@ManagedAttribute(description = "Summary of last FTP activity (all)") public String getLastFtpActivityVerbose() { FTPClient client = getOperations().getFtpClient(); FtpClientActivityListener listener = (FtpClientActivityListener) client.getCopyStreamListener(); if (listener != null) { String log = listener.getLastVerboseLogActivity(); if (log != null) { long since = listener.getLastVerboseLogActivityTimestamp(); if (since > 0) { StopWatch watch = new StopWatch(new Date(since)); long delta = watch.taken(); String human = TimeUtils.printDuration(delta); return log + " " + human + " ago"; } else { return log; } } } return null; }
StopWatch watch = new StopWatch(); long startTime = new Date().getTime();
final StopWatch watch = new StopWatch(); boolean answer; log.debug("About to store file: {} using stream: {}", targetName, is);
final StopWatch watch = new StopWatch(); LOG.debug("About to store file: {} using stream: {}", targetName, is); if (endpoint.getFileExist() == GenericFileExist.Append) {