diff options
author | Brett Porter <brett@apache.org> | 2006-09-09 15:19:42 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2006-09-09 15:19:42 +0000 |
commit | ffded4338d5b787db49677d99cfae6dc8357d437 (patch) | |
tree | 529bc8af4bd21afba75e2abba433e91d1e4b2291 /archiva-core | |
parent | 157f00698db48c42aafb7fa09ebbd71a7fce0fa9 (diff) | |
download | archiva-ffded4338d5b787db49677d99cfae6dc8357d437.tar.gz archiva-ffded4338d5b787db49677d99cfae6dc8357d437.zip |
[MRM-167] add the execution times to the report
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@441795 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-core')
-rw-r--r-- | archiva-core/src/main/java/org/apache/maven/archiva/scheduler/task/IndexerTask.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/task/IndexerTask.java b/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/task/IndexerTask.java index 7850ea455..454a4dabb 100644 --- a/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/task/IndexerTask.java +++ b/archiva-core/src/main/java/org/apache/maven/archiva/scheduler/task/IndexerTask.java @@ -32,6 +32,7 @@ import org.apache.maven.archiva.indexer.RepositoryIndexException; import org.apache.maven.archiva.indexer.record.IndexRecordExistsArtifactFilter; import org.apache.maven.archiva.indexer.record.RepositoryIndexRecordFactory; import org.apache.maven.archiva.reporting.ReportExecutor; +import org.apache.maven.archiva.reporting.ReportingDatabase; import org.apache.maven.archiva.reporting.ReportingMetadataFilter; import org.apache.maven.archiva.reporting.ReportingStoreException; import org.apache.maven.archiva.scheduler.TaskExecutionException; @@ -153,6 +154,11 @@ public class IndexerTask boolean includeSnapshots = repositoryConfiguration.isIncludeSnapshots(); ArtifactRepository repository = repoFactory.createRepository( repositoryConfiguration ); + ReportingDatabase reporter = reportExecutor.getReportDatabase( repository ); + + // keep original value in case there is another process under way + long origStartTime = reporter.getStartTime(); + reporter.setStartTime( System.currentTimeMillis() ); // Discovery process String layoutProperty = repositoryConfiguration.getLayout(); @@ -196,8 +202,7 @@ public class IndexerTask } } - MetadataFilter metadataFilter = - new ReportingMetadataFilter( reportExecutor.getReportDatabase( repository ) ); + MetadataFilter metadataFilter = new ReportingMetadataFilter( reporter ); MetadataDiscoverer metadataDiscoverer = (MetadataDiscoverer) metadataDiscoverers.get( layoutProperty ); @@ -211,6 +216,8 @@ public class IndexerTask // run the reports reportExecutor.runMetadataReports( metadata, repository ); } + + reporter.setStartTime( origStartTime ); } } } |