}
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);