MCPcopy Create free account
hub / github.com/cmu-db/benchbase / clearValues

Method clearValues

src/main/java/com/oltpbenchmark/util/Histogram.java:330–346  ·  view source on GitHub ↗

Clear all the values stored in the histogram. The keys are only kept if KeepZeroEntries is enabled, otherwise it does the same thing as clear()

()

Source from the content-addressed store, hash-verified

328 * enabled, otherwise it does the same thing as clear()
329 */
330 public synchronized void clearValues() {
331 if (this.keep_zero_entries) {
332 for (Entry<X, Integer> e : this.histogram.entrySet()) {
333 this.histogram.put(e.getKey(), 0);
334 } // FOR
335 this.num_samples = 0;
336 this.min_count = 0;
337 if (this.min_count_values != null) this.min_count_values.clear();
338 this.min_value = null;
339 this.max_count = 0;
340 if (this.max_count_values != null) this.max_count_values.clear();
341 this.max_value = null;
342 } else {
343 this.clear();
344 }
345 this.dirty = true;
346 }
347
348 /**
349 * @return

Callers 1

testClearValuesMethod · 0.80

Calls 2

clearMethod · 0.95
putMethod · 0.45

Tested by 1

testClearValuesMethod · 0.64