mirror of
https://github.com/apache/archiva.git
synced 2025-02-24 03:25:38 +00:00
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
This commit is contained in:
parent
b1b88585b8
commit
48185a913b
@ -49,7 +49,11 @@
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* ArchivaCli
|
||||||
|
*
|
||||||
* @author Jason van Zyl
|
* @author Jason van Zyl
|
||||||
|
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||||
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class ArchivaCli
|
public class ArchivaCli
|
||||||
extends AbstractCli
|
extends AbstractCli
|
||||||
@ -160,14 +164,22 @@ private void doScan( CommandLine cli, PlexusContainer plexus )
|
|||||||
RepositoryContentStatistics stats = scanner.scan( repo, consumerList, true );
|
RepositoryContentStatistics stats = scanner.scan( repo, consumerList, true );
|
||||||
|
|
||||||
SimpleDateFormat df = new SimpleDateFormat();
|
SimpleDateFormat df = new SimpleDateFormat();
|
||||||
|
System.out.println( "" );
|
||||||
System.out.println( ".\\ Scan of " + repo.getId() + " \\.__________________________________________" );
|
System.out.println( ".\\ Scan of " + repo.getId() + " \\.__________________________________________" );
|
||||||
System.out.println( " Repository URL : " + repo.getUrl() );
|
System.out.println( " Repository URL : " + repo.getUrl() );
|
||||||
System.out.println( " Repository Name : " + repo.getModel().getName() );
|
System.out.println( " Repository Name : " + repo.getModel().getName() );
|
||||||
System.out.println( " Repository Layout : " + repo.getModel().getLayoutName() );
|
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( " Duration : " + DateUtil.getDuration( stats.getDuration() ) );
|
||||||
System.out.println( " When Gathered : " + df.format( stats.getWhenGathered() ) );
|
System.out.println( " When Gathered : " + df.format( stats.getWhenGathered() ) );
|
||||||
System.out.println( " Total File Count : " + stats.getTotalFileCount() );
|
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( "______________________________________________________________" );
|
System.out.println( "______________________________________________________________" );
|
||||||
}
|
}
|
||||||
catch ( RepositoryException e )
|
catch ( RepositoryException e )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user