mirror of https://github.com/apache/archiva.git
log time to merge indexes
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f60f64732a
commit
6abe3b6a90
|
@ -25,6 +25,7 @@ import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
|
|||
import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang.time.StopWatch;
|
||||
import org.apache.maven.index.NexusIndexer;
|
||||
import org.apache.maven.index.context.IndexingContext;
|
||||
import org.apache.maven.index.context.UnsupportedExistingLuceneIndexException;
|
||||
|
@ -90,6 +91,9 @@ public class DefaultIndexMerger
|
|||
public IndexingContext buildMergedIndex( IndexMergerRequest indexMergerRequest )
|
||||
throws IndexMergerException
|
||||
{
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.reset();
|
||||
stopWatch.start();
|
||||
File tempRepoFile = Files.createTempDir();
|
||||
tempRepoFile.deleteOnExit();
|
||||
|
||||
|
@ -120,6 +124,8 @@ public class DefaultIndexMerger
|
|||
}
|
||||
temporaryGroupIndexes.add(
|
||||
new TemporaryGroupIndex( tempRepoFile, tempRepoId, indexMergerRequest.getGroupId() ) );
|
||||
stopWatch.stop();
|
||||
log.info( "merged index for repos {} in {} s", indexMergerRequest.getRepositoriesIds(), stopWatch.getTime() );
|
||||
return indexingContext;
|
||||
}
|
||||
catch ( IOException e )
|
||||
|
|
Loading…
Reference in New Issue