Examples of ProgressLogger


Examples of net.sf.picard.util.ProgressLogger

        referenceSequenceFile);

    CramHeader cramHeader = iterator.getCramHeader();
    iterator.close();

    ProgressLogger progress = new ProgressLogger(log, 100000,
        "Validated Read");
    SamFileValidator v = new SamFileValidator(new PrintWriter(System.out),
        1);
    List<SAMValidationError.Type> errors = new ArrayList<SAMValidationError.Type>();
    errors.add(Type.MATE_NOT_FOUND);
//    errors.add(Type.MISSING_TAG_NM);
    v.setErrorsToIgnore(errors);
    v.init(referenceSequenceFile, cramHeader.samFileHeader);
    v.validateSamRecords(new SAMIterator.CramFileIterable(
        params.cramFile, referenceSequenceFile),
        cramHeader.samFileHeader);
    log.info("Elapsed seconds: " + progress.getElapsedSeconds());
  }
View Full Code Here

Examples of org.apache.jena.atlas.logging.ProgressLogger

        }
    }

    private static void tupleIndexCopy(TupleIndex index1, TupleIndex index2, String label)
    {
        ProgressLogger monitor = new ProgressLogger(log, label, tickQuantum, superTick) ;
        monitor.start() ;
       
        Iterator<Tuple<NodeId>> iter1 = index1.all() ;
       
        long counter = 0 ;
        for ( ; iter1.hasNext(); )
        {
            counter++ ;
            Tuple<NodeId> tuple = iter1.next() ;
            index2.add(tuple) ;
            monitor.tick() ;
        }
       
        index2.sync() ;
        long time = monitor.finish() ;
        float elapsedSecs = time/1000F ;
       
        float rate = (elapsedSecs!=0) ? counter/elapsedSecs : 0 ;
       
        print("Total: %,d records : %,.2f seconds : %,.2f records/sec [%s]", counter, elapsedSecs, rate, nowAsString()) ;
View Full Code Here

Examples of org.apache.jena.atlas.logging.ProgressLogger

    // ??Fast copy by record.
   
    private static void bptCopy(RangeIndex bpt1, RangeIndex bpt2, String label)
    {
        ProgressLogger monitor = new ProgressLogger(log, label, tickQuantum, superTick) ;
        monitor.start() ;
        RecordFactory rf = bpt1.getRecordFactory() ;
       
        Iterator<Record> iter1 = bpt1.iterator() ;
        long counter = 0 ;
        // Use the same slot each time.
        Record r2 = rf.create() ;
       
        for ( ; iter1.hasNext(); )
        {
            counter++ ;
            Record r = iter1.next() ;
            byte[] key1 = r.getKey() ;
           
            long i1 = Bytes.getLong(key1, 0 ) ;
            long i2 = Bytes.getLong(key1, 8 ) ;
            long i3 = Bytes.getLong(key1, 16 ) ;
           
            //r2 = rf.create() ;
            //bpt2.add(r) ;
            // TESTING: SPO => OSP
            byte[] key2 = r2.getKey() ;
            Bytes.setLong(i3, key2, 0) ;
            Bytes.setLong(i1, key2, 8) ;
            Bytes.setLong(i2, key2, 16) ;
            bpt2.add(r2) ;
            monitor.tick() ;
        }
       
        bpt2.sync() ;
        long time = monitor.finish() ;
        float elapsedSecs = time/1000F ;
       
        float rate = (elapsedSecs!=0) ? counter/elapsedSecs : 0 ;
       
        String str =  String.format("Total: %,d records : %,.2f seconds : %,.2f records/sec [%s]", counter, elapsedSecs, rate, nowAsString()) ;
View Full Code Here

Examples of org.apache.jena.atlas.logging.ProgressLogger

        dsg.getTripleTable().getNodeTupleTable().getTupleTable().close();
        dsg.getQuadTable().getNodeTupleTable().getTupleTable().close();
        // Later - attach prefix table to parser.
        dsg.getPrefixes().close() ;
       
        ProgressLogger monitor = new ProgressLogger(cmdLog, "Data", BulkLoader.DataTickPoint,BulkLoader.superTick) ;
        OutputStream outputTriples = null ;
        OutputStream outputQuads = null ;
       
        try {
            outputTriples = new FileOutputStream(dataFileTriples) ;
            outputQuads = new FileOutputStream(dataFileQuads) ;
        }
        catch (FileNotFoundException e) { throw new AtlasException(e) ; }
       
        NodeTableBuilder sink = new NodeTableBuilder(dsg, monitor, outputTriples, outputQuads) ;
        monitor.start() ;
        sink.startBulk() ;
        for( String filename : datafiles)
        {
            if ( datafiles.size() > 0 )
                cmdLog.info("Load: "+filename+" -- "+Utils.nowAsString()) ;
            RiotReader.parse(filename, sink) ;
        }
        sink.finishBulk() ;
        IO.close(outputTriples) ;
        IO.close(outputQuads) ;
       
        // ---- Stats
       
        // See Stats class.
        if ( ! location.isMem() )
            Stats.write(dsg.getLocation().getPath(Names.optStats), sink.getCollector().results()) ;
       
        // ---- Monitor
        long time = monitor.finish() ;

        long total = monitor.getTicks() ;
        float elapsedSecs = time/1000F ;
        float rate = (elapsedSecs!=0) ? total/elapsedSecs : 0 ;
        String str =  String.format("Total: %,d tuples : %,.2f seconds : %,.2f tuples/sec [%s]", total, elapsedSecs, rate, nowAsString()) ;
        cmdLog.info(str) ;
    }
View Full Code Here

Examples of org.apache.jena.atlas.logging.ProgressLogger

        dsg.getTripleTable().getNodeTupleTable().getTupleTable().close();
        dsg.getQuadTable().getNodeTupleTable().getTupleTable().close();
        // Later - attach prefix table to parser.
        dsg.getPrefixes().close() ;
       
        ProgressLogger monitor = new ProgressLogger(cmdLog, "Data", BulkLoader.DataTickPoint,BulkLoader.superTick) ;
        OutputStream outputTriples = null ;
        OutputStream outputQuads = null ;
       
        try {
            outputTriples = new FileOutputStream(dataFileTriples) ;
            outputQuads = new FileOutputStream(dataFileQuads) ;
        }
        catch (FileNotFoundException e) { throw new AtlasException(e) ; }
       
        NodeTableBuilder sink = new NodeTableBuilder(dsg, monitor, outputTriples, outputQuads) ;
        monitor.start() ;
        sink.startBulk() ;
        for( String filename : datafiles)
        {
            if ( datafiles.size() > 0 )
                cmdLog.info("Load: "+filename+" -- "+Utils.nowAsString()) ;
            RiotReader.parse(filename, sink) ;
        }
        sink.finishBulk() ;
        IO.close(outputTriples) ;
        IO.close(outputQuads) ;
       
        // ---- Stats
       
        // See Stats class.
        if ( ! location.isMem() )
            Stats.write(dsg.getLocation().getPath(Names.optStats), sink.getCollector().results()) ;
       
        // ---- Monitor
        long time = monitor.finish() ;

        long total = monitor.getTicks() ;
        float elapsedSecs = time/1000F ;
        float rate = (elapsedSecs!=0) ? total/elapsedSecs : 0 ;
        String str =  String.format("Total: %,d tuples : %,.2f seconds : %,.2f tuples/sec [%s]", total, elapsedSecs, rate, nowAsString()) ;
        cmdLog.info(str) ;
    }
View Full Code Here

Examples of org.gradle.logging.ProgressLogger

    public AbstractProgressLoggingHandler(ProgressLoggerFactory progressLoggerFactory) {
        this.progressLoggerFactory = progressLoggerFactory;
    }

    protected ResourceOperation createResourceOperation(String resourceName, ResourceOperation.Type operationType, Class loggingClazz, long contentLength) {
        ProgressLogger progressLogger = startProgress(String.format("%s %s", operationType.getCapitalized(), resourceName), loggingClazz);
        return new ResourceOperation(progressLogger, operationType, contentLength);
    }
View Full Code Here

Examples of org.gradle.logging.ProgressLogger

        ProgressLogger progressLogger = startProgress(String.format("%s %s", operationType.getCapitalized(), resourceName), loggingClazz);
        return new ResourceOperation(progressLogger, operationType, contentLength);
    }

    private ProgressLogger startProgress(String description, Class loggingClass) {
        ProgressLogger progressLogger = progressLoggerFactory.newOperation(loggingClass != null ? loggingClass : getClass());
        progressLogger.setDescription(description);
        progressLogger.setLoggingHeader(description);
        progressLogger.started();
        return progressLogger;
    }
View Full Code Here

Examples of org.gradle.logging.ProgressLogger

            this.progressLoggerFactory = progressLoggerFactory;
            this.delegate = delegate;
        }

        public void execute(PersistentCache cache) {
            ProgressLogger op = progressLoggerFactory.newOperation(FileCacheBackedScriptClassCompiler.class)
                    .start("Compile script into cache", "Compiling script into cache");
            try {
                delegate.execute(cache);
            } finally {
                op.completed();
            }
        }
View Full Code Here

Examples of org.gradle.logging.ProgressLogger

        private ProgressReportingDownload(ProgressLoggerFactory progressLoggerFactory) {
            this.progressLoggerFactory = progressLoggerFactory;
        }

        public void download(URI address, File destination) throws Exception {
            ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
            progressLogger.setDescription(String.format("Download %s", address));
            progressLogger.started();
            try {
                new Download("Gradle Tooling API", GradleVersion.current().getVersion()).download(address, destination);
            } finally {
                progressLogger.completed();
            }
        }
View Full Code Here

Examples of org.gradle.logging.ProgressLogger

        public String getDisplayName() {
            return displayName;
        }

        public ClassPath getToolingImplementationClasspath(ProgressLoggerFactory progressLoggerFactory, File userHomeDir, BuildCancellationToken cancellationToken) {
            ProgressLogger progressLogger = progressLoggerFactory.newOperation(DistributionFactory.class);
            progressLogger.setDescription("Validate distribution");
            progressLogger.started();
            try {
                return getToolingImpl();
            } finally {
                progressLogger.completed();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.