Source:
<code>private void fullTest(int size, int[] fuzz, String distributionName) { PerformanceMeter pMinsertion = fPerf.createPerformanceMeter(distributionName + " Insertion: " + fName); PerformanceMeter pMiterateStart = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by start: " + fName); PerformanceMeter pMiterateEnd = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by end: " + fName); PerformanceMeter pMiterateDuration = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by length: " + fName); for (int i = 0; i < DEFAULT_LOOP_COUNT; i++) { fSegStore.clear(); pMinsertion.start(); populate(size, fuzz, fSegStore, 0, getSegmentStoreSize()); pMinsertion.stop(); pMiterateStart.start(); int count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_START_COMPARATOR); pMiterateStart.stop(); assertEquals(fSegStore.size(), count); pMiterateEnd.start(); count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_END_COMPARATOR); pMiterateEnd.stop(); assertEquals(fSegStore.size(), count); pMiterateDuration.start(); count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); pMiterateDuration.stop(); assertEquals(fSegStore.size(), count); } pMinsertion.commit(); pMiterateStart.commit(); pMiterateEnd.commit(); pMiterateDuration.commit(); <START> assertOrder(fSegStore, SegmentComparators.INTERVAL_START_COMPARATOR); <END> assertOrder(fSegStore, SegmentComparators.INTERVAL_END_COMPARATOR); assertOrder(fSegStore, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); }</code><technical_language>I put this end I? put iterate (if i == 0) { ... } is loops if sort order is incorrect I think, results benchmark right anyway</technical_language>

Target:
private void fullTest(int size, int[] fuzz, String distributionName) { PerformanceMeter pMinsertion = fPerf.createPerformanceMeter(distributionName + " Insertion: " + fName); PerformanceMeter pMiterateStart = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by start: " + fName); PerformanceMeter pMiterateEnd = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by end: " + fName); PerformanceMeter pMiterateDuration = fPerf.createPerformanceMeter(distributionName + " Iterate sorted by length: " + fName); for (int i = 0; i < DEFAULT_LOOP_COUNT; i++) { fSegStore.clear(); pMinsertion.start(); populate(size, fuzz, fSegStore, 0, getSegmentStoreSize()); pMinsertion.stop(); if (i == 0) { assertOrder(fSegStore, SegmentComparators.INTERVAL_START_COMPARATOR); assertOrder(fSegStore, SegmentComparators.INTERVAL_END_COMPARATOR); assertOrder(fSegStore, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); } pMiterateStart.start(); int count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_START_COMPARATOR); pMiterateStart.stop(); assertEquals(fSegStore.size(), count); pMiterateEnd.start(); count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_END_COMPARATOR); pMiterateEnd.stop(); assertEquals(fSegStore.size(), count); pMiterateDuration.start(); count = sortedIterate(fSegStore, SegmentComparators.INTERVAL_LENGTH_COMPARATOR); pMiterateDuration.stop(); assertEquals(fSegStore.size(), count); } pMinsertion.commit(); pMiterateStart.commit(); pMiterateEnd.commit(); pMiterateDuration.commit(); }