public static RunStats delegateGetBucketForUuids(int buckets) throws Exception {
  Long startTime=System.currentTimeMillis();
  PrimaryIndexBucketGeneratorImpl ibg=new PrimaryIndexBucketGeneratorImpl(FieldDataType.UUID,buckets);
  PrimaryIndexBucketLocatorImpl locator=new PrimaryIndexBucketLocatorImpl(null,null,null,null,null,ibg.generateBuckets(),null,null,null);
  logger.debug("test to getBucket for the bucket distribution on UUIDs");
  HashMap<Long,List<Object>> hm=new HashMap<>();
  SummaryStatistics stats=new SummaryStatistics();
  UUID[] uuid=new UUID[10000];
  for (int i=0; i < 10000; i++) {
    uuid[i]=UUID.randomUUID();
  }
  for (int inputUuid=0; inputUuid < 10000; inputUuid++) {
    Long bucketId=locator.getBucket(uuid[inputUuid],FieldDataType.UUID);
    calculate(hm,stats,bucketId,inputUuid);
  }
  Long runTime=System.currentTimeMillis() - startTime;
  RunStats runStats=new RunStats("BucketForUUIDs",FieldDataType.UUID,runTime,stats,hm);
  logger.debug(runStats.toString());
  return runStats;
}

public static RunStats delegateGetBucketForUuids ( int buckets ) throws Exception { Long startTime = System . currentTimeMillis ( ) ; PrimaryIndexBucketGeneratorImpl ibg = new PrimaryIndexBucketGeneratorImpl ( FieldDataType . UUID , buckets ) ; PrimaryIndexBucketLocatorImpl locator = new PrimaryIndexBucketLocatorImpl ( null , null , null , null , null , ibg . generateBuckets ( ) , null , null , null ) ; logger . debug ( "test to getBucket for the bucket distribution on UUIDs" ) ; HashMap < Long , List < Object > > hm = new HashMap < > ( ) ; SummaryStatistics stats = new SummaryStatistics ( ) ; UUID [ ] uuid = new UUID [ 10000 ] ; for ( int i = 0 ; i < 10000 ; i ++ ) { uuid [ i ] = UUID . randomUUID ( ) ; } for ( int inputUuid = 0 ; inputUuid < 10000 ; inputUuid ++ ) { Long bucketId = locator . getBucket ( uuid [ inputUuid ] , FieldDataType . UUID ) ; calculate ( hm , stats , bucketId , inputUuid ) ; } Long runTime = System . currentTimeMillis ( ) - startTime ; RunStats runStats = new RunStats ( "BucketForUUIDs" , FieldDataType . UUID , runTime , stats , hm ) ; logger . debug ( runStats . toString ( ) ) ; return runStats ; }
test to check the bucket distribution for the uuid values
