/** * Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this * will effectively be a noop. */ public void end(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { LOG.info("Called end with key: " + key + " without ever calling begin"); return; } data.end(); }
/** * Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging. * @param otherStatistics */ private void merge(ExecutionStatistics otherStatistics) { for (String s : otherStatistics.executionInfo.keySet()) { TimingData thisStats = this.executionInfo.get(s); TimingData otherStats = otherStatistics.executionInfo.get(s); if(thisStats == null) { this.executionInfo.put(s,otherStats); } else { thisStats.merge(otherStats); } } }
/** * Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this * will effectively be a noop. */ public void end(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { LOG.info("Called end with key: " + key + " without ever calling begin"); return; } data.end(); }
/** * Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this * will effectively be a noop. */ public void end(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { LOG.info("Called end with key: " + key + " without ever calling begin"); return; } data.end(); }
/** * Start timing an operation with the given identifier. */ public void begin(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { data = new TimingData(key); executionInfo.put(key, data); } data.begin(); }
/** * Start timing an operation with the given identifier. */ public void begin(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { data = new TimingData(key); executionInfo.put(key, data); } data.begin(); }
/** * Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging. * @param otherStatistics */ private void merge(ExecutionStatistics otherStatistics) { for (String s : otherStatistics.executionInfo.keySet()) { TimingData thisStats = this.executionInfo.get(s); TimingData otherStats = otherStatistics.executionInfo.get(s); if(thisStats == null) { this.executionInfo.put(s,otherStats); } else { thisStats.merge(otherStats); } } }
/** * Start timing an operation with the given identifier. */ public void begin(String key) { if (key == null) { return; } TimingData data = executionInfo.get(key); if (data == null) { data = new TimingData(key); executionInfo.put(key, data); } data.begin(); }