primeGraph.createWorkspace().named(workspaceName2);
// Prime the search engine ...
sw.reset();
sw.start();
SearchEngineIndexer indexer = new SearchEngineIndexer(context, searchEngine, connectionFactory);
indexer.indexAllWorkspaces();
indexer.close();
sw.stop();
Duration zeroth = sw.getTotalDuration();
System.out.println("Time to prime search engine: " + zeroth);
// First load the content into the unsearched source ...
sw.reset();
sw.start();
loadContent(unsearchedContent);
sw.stop();
Duration first = sw.getTotalDuration();
// Now load the same content into the searchable source ...
sw.reset();
sw.start();
loadContent(content);
sw.stop();
Duration second = sw.getTotalDuration();
// And measure the time required to re-index ...
sw.reset();
sw.start();
indexer = new SearchEngineIndexer(context, searchEngine, connectionFactory);
indexer.indexAllWorkspaces();
indexer.close();
sw.stop();
Duration third = sw.getTotalDuration();
int percentOfLoading = (int)(((second.floatValue() / first.floatValue())) * 100.0f);
System.out.println("Time to load content without indexing: " + first);