List of usage examples for org.springframework.util StopWatch start
public void start(String taskName) throws IllegalStateException
From source file:ubic.gemma.tasks.visualization.DifferentialExpressionSearchTaskImpl.java
/** * The actual business of fetching the differential expression results. * /*from ww w . ja va2s .c o m*/ * @param resultSets * @param geneIds * @param searchResult holds the results */ private void fetchDifferentialExpressionResults( Map<ExpressionAnalysisResultSet, Collection<Long>> resultSetIdsToArrayDesignsUsed, List<Long> geneIds, DifferentialExpressionGenesConditionsValueObject searchResult) { StopWatch watch = new StopWatch("Process differential expression search"); watch.start("Fetch diff ex results"); // Main query for results; the main time sink. Map<Long, Map<Long, DiffExprGeneSearchResult>> resultSetToGeneResults = differentialExpressionResultService .findDifferentialExpressionAnalysisResultIdsInResultSet(resultSetIdsToArrayDesignsUsed, geneIds); watch.stop(); Map<Long, ExpressionAnalysisResultSet> resultSetMap = EntityUtils .getIdMap(resultSetIdsToArrayDesignsUsed.keySet()); Collection<DiffExprGeneSearchResult> aggregatedResults = aggregateAcrossResultSets(resultSetToGeneResults); watch.start("Fetch details for contrasts for " + aggregatedResults.size() + " results"); Map<Long, ContrastsValueObject> detailedResults = getDetailsForContrasts(aggregatedResults); processHits(searchResult, resultSetToGeneResults, resultSetMap, detailedResults); watch.stop(); log.info("Diff ex search finished:\n" + watch.prettyPrint()); }