Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.Footprint


        }
        IOConsoleOutputStream out = FindBugsConsole.getConsole().newOutputStream();
        PrintWriter pw = new PrintWriter(out);

        ProjectStats stats = bugCollection.getProjectStats();
        Footprint footprint = new Footprint(stats.getBaseFootprint());
        Profiler profiler = stats.getProfiler();
        Profile profile = profiler.getProfile(ClassDataAnalysisEngine.class);
        long totalClassReadTime = TimeUnit.MILLISECONDS.convert(profile.getTotalTime(), TimeUnit.NANOSECONDS);
        long totalTime = TimeUnit.MILLISECONDS.convert(footprint.getClockTime(), TimeUnit.MILLISECONDS);

        double classReadSpeed = totalClassReadTime > 0? data.byteSize * 1000 / totalClassReadTime : 0;
        double classCountSpeed = totalTime > 0? data.classCount * 1000 / totalTime : 0;
        double classPart = totalTime > 0? totalClassReadTime * 100 / totalTime : 0;
        double appPart = data.byteSize > 0? data.byteSizeApp * 100 / data.byteSize : 0;
        double bytesPerClass = data.classCount > 0? data.byteSize / data.classCount : 0;
        long peakMemory = footprint.getPeakMemory() / (1024 * 1024);
        pw.printf("%n");
        pw.printf("Peak memory (MB)      : %1$ 20d %n", peakMemory);
        pw.printf("Total classes         : %1$ 20d %n", data.classCount);
        pw.printf("Total time (msec)     : %1$ 20d %n", totalTime);
        pw.printf("Class read time (msec): %1$ 20d %n", totalClassReadTime);
View Full Code Here


        }
        printToStream("Finished, found: " + bugCount + " bugs");
        ConfigurableXmlOutputStream xmlStream = new ConfigurableXmlOutputStream(stream, true);
        ProjectStats stats = bugCollection.getProjectStats();

        printToStream("\nFootprint: " + new Footprint(stats.getBaseFootprint()).toString());

        Profiler profiler = stats.getProfiler();
        PrintStream printStream;
        try {
            printStream = new PrintStream(stream, false, "UTF-8");
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.Footprint

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.