Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.ProjectStats


            return;
        }
        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;
View Full Code Here


        if (!isStreamReportingEnabled()) {
            return;
        }
        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");
        } catch (UnsupportedEncodingException e1) {
            // can never happen with UTF-8
            return;
        }

        printToStream("\nTotal time:");
        profiler.report(new Profiler.TotalTimeComparator(profiler), new Profiler.FilterByTime(10000000), printStream);

        printToStream("\nTotal calls:");
        profiler.report(new Profiler.TotalCallsComparator(profiler), new Profiler.FilterByCalls(stats.getNumClasses()),
                printStream);

        printToStream("\nTime per call:");
        profiler.report(new Profiler.TimePerCallComparator(profiler),
                new Profiler.FilterByTimePerCall(10000000 / stats.getNumClasses()), printStream);
        try {
            xmlStream.finish();
        } catch (IOException e) {
            FindbugsPlugin.getDefault().logException(e, "Print to console failed");
        }
View Full Code Here

TOP

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

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.