question: static public void doRandomIndexOfTest ( final String label , final AbstractBTree btree , final byte [ ] [ ] keys , final byte [ ] [ ] vals ) { final int nentries = keys . length ; if ( log . isInfoEnabled ( ) ) log . info ( "\ncondition: " + label + ", nentries=" + nentries ) ; final int [ ] order = getRandomOrder ( nentries ) ; final long begin = System . currentTimeMillis ( ) ; final boolean randomOrder = true ; for ( int i = 0 ; i < nentries ; i ++ ) { final int entryIndex = randomOrder ? order [ i ] : i ; final byte [ ] key = keys [ entryIndex ] ; assertEquals ( "indexOf" , entryIndex , btree . indexOf ( key ) ) ; final byte [ ] expectedVal = vals [ entryIndex ] ; assertEquals ( "keyAt" , key , btree . keyAt ( entryIndex ) ) ; assertEquals ( "valueAt" , expectedVal , btree . valueAt ( entryIndex ) ) ; } if ( log . isInfoEnabled ( ) ) { final long elapsed = System . currentTimeMillis ( ) - begin ; log . info ( label + " : tested " + nentries + " keys in " + elapsed + "ms" ) ; } }
target:  Tests the performance of random lookups of keys and values by entry index. This vets the separator keys and childRef/childAddr arrays, which are used to lookup the entry index for a key, and also vets the childEntryCount[] array, since that is responsible for lookup by entry index.