diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-04-03 22:11:40 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-04-03 22:11:40 +0000 |
commit | 48185a913b2c3db47085e6b6cfc696af08b8ae91 (patch) | |
tree | b0c00e945532fa8cb87a2e46d4cc75bd623afceb /archiva-cli/src | |
parent | b1b88585b86f4322cafb6278ebeb259e529e2896 (diff) | |
download | archiva-48185a913b2c3db47085e6b6cfc696af08b8ae91.tar.gz archiva-48185a913b2c3db47085e6b6cfc696af08b8ae91.zip |
Updating information about last repository scan on client output
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@525305 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-cli/src')
-rw-r--r-- | archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java index 921bd8883..903593443 100644 --- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java @@ -49,7 +49,11 @@ import java.util.Map; import java.util.Properties; /** + * ArchivaCli + * * @author Jason van Zyl + * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a> + * @version $Id$ */ public class ArchivaCli extends AbstractCli @@ -160,14 +164,22 @@ public class ArchivaCli RepositoryContentStatistics stats = scanner.scan( repo, consumerList, true ); SimpleDateFormat df = new SimpleDateFormat(); + System.out.println( "" ); System.out.println( ".\\ Scan of " + repo.getId() + " \\.__________________________________________" ); System.out.println( " Repository URL : " + repo.getUrl() ); System.out.println( " Repository Name : " + repo.getModel().getName() ); System.out.println( " Repository Layout : " + repo.getModel().getLayoutName() ); + System.out.println( " Consumers : (" + consumerList.size() + " active)" ); + for ( Iterator iter = consumerList.iterator(); iter.hasNext(); ) + { + RepositoryContentConsumer consumer = (RepositoryContentConsumer) iter.next(); + System.out.println( " " + consumer.getId() + " - " + consumer.getDescription() ); + } System.out.println( " Duration : " + DateUtil.getDuration( stats.getDuration() ) ); System.out.println( " When Gathered : " + df.format( stats.getWhenGathered() ) ); System.out.println( " Total File Count : " + stats.getTotalFileCount() ); - System.out.println( " New File Count : " + stats.getNewFileCount() ); + long averageMsPerFile = ( stats.getDuration() / stats.getTotalFileCount() ); + System.out.println( " Avg Time Per File : " + DateUtil.getDuration( averageMsPerFile ) ); System.out.println( "______________________________________________________________" ); } catch ( RepositoryException e ) |