Package org.apache.archiva.rest.api.model

Examples of org.apache.archiva.rest.api.model.ConsumerScanningStatistics


        }
        List<ConsumerScanningStatistics> ret =
            new ArrayList<ConsumerScanningStatistics>( instance.getConsumerCounts().size() );
        for ( Map.Entry<String, Long> entry : instance.getConsumerCounts().entrySet() )
        {
            ConsumerScanningStatistics consumerScanningStatistics = new ConsumerScanningStatistics();
            consumerScanningStatistics.setConsumerKey( entry.getKey() );
            consumerScanningStatistics.setCount( entry.getValue() );
            consumerScanningStatistics.setTime( instance.getConsumerTimings().get( entry.getKey() ) );
            if ( consumerScanningStatistics.getCount() > 0 )
            {
                consumerScanningStatistics.setAverage( decimalFormat.format(
                    consumerScanningStatistics.getTime() / consumerScanningStatistics.getCount() ) );
            }
            ret.add( consumerScanningStatistics );
        }
        Collections.sort( ret, ConsumerScanningStatisticsComparator.INSTANCE );
        return ret;
View Full Code Here


        }
        List<ConsumerScanningStatistics> ret =
            new ArrayList<ConsumerScanningStatistics>( instance.getConsumerCounts().size() );
        for ( Map.Entry<String, Long> entry : instance.getConsumerCounts().entrySet() )
        {
            ConsumerScanningStatistics consumerScanningStatistics = new ConsumerScanningStatistics();
            consumerScanningStatistics.setConsumerKey( entry.getKey() );
            consumerScanningStatistics.setCount( entry.getValue() );
            consumerScanningStatistics.setTime( instance.getConsumerTimings().get( entry.getKey() ) );
            if ( consumerScanningStatistics.getCount() > 0 )
            {
                consumerScanningStatistics.setAverage( decimalFormat.format(
                    consumerScanningStatistics.getTime() / consumerScanningStatistics.getCount() ) );
            }
            ret.add( consumerScanningStatistics );
        }
        Collections.sort( ret, ConsumerScanningStatisticsComparator.INSTANCE );
        return ret;
View Full Code Here

        // FIXME take care of NPE here !!!
        List<ConsumerScanningStatistics> ret =
            new ArrayList<ConsumerScanningStatistics>( instance.getConsumerCounts().size() );
        for ( Map.Entry<String, Long> entry : instance.getConsumerCounts().entrySet() )
        {
            ConsumerScanningStatistics consumerScanningStatistics = new ConsumerScanningStatistics();
            consumerScanningStatistics.setConsumerKey( entry.getKey() );
            consumerScanningStatistics.setCount( entry.getValue() );
            consumerScanningStatistics.setTime( instance.getConsumerTimings().get( entry.getKey() ) );
            if ( consumerScanningStatistics.getCount() > 0 )
            {
                consumerScanningStatistics.setAverage( decimalFormat.format(
                    consumerScanningStatistics.getTime() / consumerScanningStatistics.getCount() ) );
            }
            ret.add( consumerScanningStatistics );
        }
        Collections.sort( ret, ConsumerScanningStatisticsComparator.INSTANCE );
        return ret;
View Full Code Here

TOP

Related Classes of org.apache.archiva.rest.api.model.ConsumerScanningStatistics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.