Package org.broadinstitute.gatk.utils

Examples of org.broadinstitute.gatk.utils.AutoFormattingTime


     *
     * @param logger
     */
    public synchronized void printUsageInformation(final Logger logger, final Priority priority) {
        logger.debug("Number of threads monitored: " + getnThreadsAnalyzed());
        logger.debug("Total runtime " + new AutoFormattingTime(TimeUnit.MILLISECONDS.toNanos(getTotalTime())));
        for ( final State state : State.values() ) {
            logger.debug(String.format("\tPercent of time spent %s is %.2f", state.getUserFriendlyName(), getStatePercent(state)));
        }
        logger.log(priority, String.format("CPU      efficiency : %6.2f%% of time spent %s", getStatePercent(State.USER_CPU), State.USER_CPU.getUserFriendlyName()));
        logger.log(priority, String.format("Walker inefficiency : %6.2f%% of time spent %s", getStatePercent(State.BLOCKING), State.BLOCKING.getUserFriendlyName()));
View Full Code Here


     * @return true if we should abort execution, or false otherwise
     */
    protected boolean abortExecution() {
        final boolean abort = engine.exceedsRuntimeLimit();
        if ( abort ) {
            final AutoFormattingTime aft = new AutoFormattingTime(engine.getRuntimeLimitInNanoseconds(), -1, 4);
            logger.info("Aborting execution (cleanly) because the runtime has exceeded the requested maximum " + aft);
        }
        return abort;
    }
View Full Code Here

        return tests.toArray(new Object[][]{});
    }

    @Test(dataProvider = "AutoFormattingTimeUnitSelection")
    public void testUnitSelection(final long nano, final String expectedUnit) throws InterruptedException {
        final AutoFormattingTime time = new AutoFormattingTime(nano);
        testBasic(time, nano, time.getWidth(), time.getPrecision());
        Assert.assertTrue(time.toString().endsWith(expectedUnit), "TimeUnit " + time.toString() + " didn't contain expected time unit " + expectedUnit);
    }
View Full Code Here

    @Test(dataProvider = "AutoFormattingTimeUnitSelection")
    public void testSecondsAsDouble(final long nano, final String expectedUnit) throws InterruptedException {
        final double inSeconds = nano * 1e-9;
        final long nanoFromSeconds = (long)(inSeconds * 1e9);
        final AutoFormattingTime time = new AutoFormattingTime(inSeconds);
        testBasic(time, nanoFromSeconds, time.getWidth(), time.getPrecision());
    }
View Full Code Here

        return tests.toArray(new Object[][]{});
    }

    @Test(dataProvider = "AutoFormattingTimeWidthAndPrecision")
    public void testWidthAndPrecision(final double inSeconds, final int width, final int precision) throws InterruptedException {
        final AutoFormattingTime time = new AutoFormattingTime(inSeconds, width, precision);
        final long nanoFromSeconds = (long)(inSeconds * 1e9);
        testBasic(time, nanoFromSeconds, width, precision);
        final Matcher match = matchToString(time);
        match.matches();
        final String widthString = match.group(1);
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.AutoFormattingTime

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.