org.quattor.pan
Class CompilerStatistics

java.lang.Object
  extended by org.quattor.pan.CompilerStatistics

public class CompilerStatistics
extends java.lang.Object

Provides statistics about a run of the pan compiler. These statistics can be used to judge the performance of the compiler with different options.

Author:
loomis

Constructor Summary
CompilerStatistics()
          Creates an object to keep track of statistics during the run of the pan compiler.
 
Method Summary
 java.lang.String getResults(long totalErrors)
          Generates a terse String representation of the statistics.
 void incrementFinishedTasks(TaskResult.ResultType type)
          Increase the count of the number of tasks of the given type that have finished successfully.
 void incrementStartedTasks(TaskResult.ResultType type)
          Increase the count of the number of tasks of the given type that have been started.
 void setBuildTime(long buildTime)
          Define the total (clock) time for a complete build in milliseconds.
 void setFileCount(long fileCount)
          The total number of files which were processed by the compiler.
 void updateMemoryInfo()
          Take a snapshot of the current memory usage of the JVM and update the high-water marks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerStatistics

public CompilerStatistics()
Creates an object to keep track of statistics during the run of the pan compiler.

Method Detail

setBuildTime

public void setBuildTime(long buildTime)
Define the total (clock) time for a complete build in milliseconds.

Parameters:
buildTime - wall-clock build time

setFileCount

public void setFileCount(long fileCount)
The total number of files which were processed by the compiler.

Parameters:
fileCount - number of processed files

incrementStartedTasks

public void incrementStartedTasks(TaskResult.ResultType type)
Increase the count of the number of tasks of the given type that have been started.

Parameters:
type - type of task that was started

incrementFinishedTasks

public void incrementFinishedTasks(TaskResult.ResultType type)
Increase the count of the number of tasks of the given type that have finished successfully.

Parameters:
type - type of task that finished

updateMemoryInfo

public void updateMemoryInfo()
Take a snapshot of the current memory usage of the JVM and update the high-water marks.


getResults

public java.lang.String getResults(long totalErrors)
Generates a terse String representation of the statistics.

Returns:
statistics as a String value


Copyright © 2011 Quattor. All Rights Reserved.