|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.perf4j.LogParser
public class LogParser
LogParser provides the main method for reading a log of StopWatch output and generating statistics and graphs from that output. Run "java -jar pathToPerf4jJar --help" for instructions.
Constructor Summary | |
---|---|
LogParser()
Default constructor reads input from standard in, writes statistics output to standard out, does not write graph output, has a time slice window of 30 seconds, and does not create rollup statistics. |
|
LogParser(Reader inputLog,
PrintStream statisticsOutput,
PrintStream graphingOutput,
long timeSlice,
boolean createRollupStatistics,
GroupedTimingStatisticsFormatter statisticsFormatter)
Creates a new LogParser to parse log data from the input. |
Method Summary | |
---|---|
protected static void |
closeGraphingOutput(PrintStream graphingOutput)
|
protected static int |
getIndexOfArg(List<String> args,
boolean needsParam,
String... argNames)
|
protected static boolean |
getRollupStatistics(List<String> argsList)
|
protected static GroupedTimingStatisticsFormatter |
getStatisticsFormatter(List<String> argsList)
|
protected static long |
getTimeSlice(List<String> argsList)
|
static void |
main(String[] args)
|
protected StatisticsChartGenerator |
newMeanTimeChartGenerator()
|
protected StatisticsChartGenerator |
newTpsChartGenerator()
|
protected static PrintStream |
openGraphingOutput(List<String> argsList)
|
protected static Reader |
openInput(List<String> argsList)
|
protected static PrintStream |
openStatisticsOutput(List<String> argsList)
|
protected static PrintStream |
openStream(String fileName)
|
void |
parseLog()
Reads all the data from the inputLog, parses it, and writes the statistics data and graphing data as desired to the output streams. |
protected void |
printGraphOutput()
|
protected static void |
printUnknownArgs(List<String> argsList)
|
protected static boolean |
printUsage(List<String> argsList)
|
static int |
runMain(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogParser()
public LogParser(Reader inputLog, PrintStream statisticsOutput, PrintStream graphingOutput, long timeSlice, boolean createRollupStatistics, GroupedTimingStatisticsFormatter statisticsFormatter)
inputLog
- The log being parsed, which should contain StopWatch
log messages.statisticsOutput
- The stream where calculated statistics information should be written - if null,
statistics data is not written.graphingOutput
- The stream where graphing data should be written - if null, graphs are not written.timeSlice
- The length of time, in milliseconds, of the timeslice of each statistics data created.createRollupStatistics
- Whether or not "rollup statistics" should be created for each timeslice of data.statisticsFormatter
- The formatter to use to print GroupedTimingStatisticsMethod Detail |
---|
public void parseLog()
protected StatisticsChartGenerator newMeanTimeChartGenerator()
protected StatisticsChartGenerator newTpsChartGenerator()
protected void printGraphOutput()
public static void main(String[] args)
public static int runMain(String[] args)
protected static boolean printUsage(List<String> argsList)
protected static PrintStream openStatisticsOutput(List<String> argsList) throws IOException
IOException
protected static PrintStream openGraphingOutput(List<String> argsList) throws IOException
IOException
protected static void closeGraphingOutput(PrintStream graphingOutput) throws IOException
IOException
protected static long getTimeSlice(List<String> argsList)
protected static boolean getRollupStatistics(List<String> argsList)
protected static GroupedTimingStatisticsFormatter getStatisticsFormatter(List<String> argsList)
protected static Reader openInput(List<String> argsList) throws IOException
IOException
protected static void printUnknownArgs(List<String> argsList)
protected static int getIndexOfArg(List<String> args, boolean needsParam, String... argNames)
protected static PrintStream openStream(String fileName) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |