System.out.printf( "Writing %s took %sms ie %sns/entry\n", nbrOfBlogEntries,
( System.nanoTime() - start ) / 1000000, ( System.nanoTime() - start ) / ( nbrOfBlogEntries ) );
System.out.printf( "Collection ratio %s entries per collection\n", nbrOfBlogEntries / nbrOfAuthors );
getTransactionManager().begin();
em.joinTransaction();
em = getFactory().createEntityManager();
int nbr_of_reads = 100000;
start = System.nanoTime();
for ( int i = 0; i < nbr_of_reads; i++ ) {
int primaryKey = rand.nextInt( nbrOfBlogEntries - 1 ) + 1; // start from 1