long start = System.currentTimeMillis();
cat = LargeCatalogReadUtils.parseCatalogIntoInvCatalogImpl( catAsString, catURL );
long done = System.currentTimeMillis();
long elapsed = done - start;
BuilderIssues bldIssues = new BuilderIssues();
start = System.currentTimeMillis();
catalogBuilder = LargeCatalogReadUtils.parseCatalogIntoBuilder( catAsString, catURL );
BuilderIssues issues = catalogBuilder.getIssues();
if ( ! issues.isValid() )
System.out.println( "Invalid catalog [" + i + "]: " + bldIssues.toString() );
catalogBuilder.build();
done = System.currentTimeMillis();
long elapsed2 = done - start;
cum+=elapsed;
cum2+=elapsed2;
System.out.println( "Read catalog ["+i+"]: InvCat=" + elapsed + " stax=" + elapsed2 + "\n" );
}
System.out.println( "Cum=" + cum );
System.out.println( "Avg=" + cum/ numAttempts );
System.out.println( "CumStax=" + cum2 );
System.out.println( "AvgStax=" + cum2/ numAttempts );
System.out.println( "InvCat" );
StringBuilder sb = new StringBuilder();
if ( cat.check( sb ) )
System.out.println( "Failed check:\n" + sb );
else
System.out.println( "OK check:\n" + sb );
System.out.println( "thredds.catalog2" );
BuilderIssues bldIssues = catalogBuilder.getIssues();
if ( ! bldIssues.isValid() )
System.out.println( "Invalid catalog: " + bldIssues.toString() );
else
System.out.println( "Valid catalog: " + ( bldIssues.isEmpty() ? "" : bldIssues.toString()) );
System.out.println( "Done" );
}