|
||||||||||
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 -cp pathToPerf4jJar org.per4j.LogParser --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(java.io.Reader inputLog,
java.io.PrintStream statisticsOutput,
java.io.PrintStream graphingOutput,
long timeSlice,
boolean createRollupStatistics)
Creates a new LogParser to parse log data from the input. |
Method Summary | |
---|---|
protected static void |
closeGraphingOutput(java.io.PrintStream graphingOutput)
|
protected static int |
getIndexOfArg(java.util.List<java.lang.String> args,
boolean needsParam,
java.lang.String... argNames)
|
protected static boolean |
getRollupStatistics(java.util.List<java.lang.String> argsList)
|
protected static long |
getTimeSlice(java.util.List<java.lang.String> argsList)
|
static void |
main(java.lang.String[] args)
|
protected StatisticsChartGenerator |
newMeanTimeChartGenerator()
|
protected StatisticsChartGenerator |
newTpsChartGenerator()
|
protected static java.io.PrintStream |
openGraphingOutput(java.util.List<java.lang.String> argsList)
|
protected static java.io.Reader |
openInput(java.util.List<java.lang.String> argsList)
|
protected static java.io.PrintStream |
openStatisticsOutput(java.util.List<java.lang.String> argsList)
|
protected static java.io.PrintStream |
openStream(java.lang.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(java.util.List<java.lang.String> argsList)
|
protected static boolean |
printUsage(java.util.List<java.lang.String> argsList)
|
static int |
runMain(java.lang.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(java.io.Reader inputLog, java.io.PrintStream statisticsOutput, java.io.PrintStream graphingOutput, long timeSlice, boolean createRollupStatistics)
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.Method Detail |
---|
public void parseLog()
protected StatisticsChartGenerator newMeanTimeChartGenerator()
protected StatisticsChartGenerator newTpsChartGenerator()
protected void printGraphOutput()
public static void main(java.lang.String[] args)
public static int runMain(java.lang.String[] args)
protected static boolean printUsage(java.util.List<java.lang.String> argsList)
protected static java.io.PrintStream openStatisticsOutput(java.util.List<java.lang.String> argsList) throws java.io.IOException
java.io.IOException
protected static java.io.PrintStream openGraphingOutput(java.util.List<java.lang.String> argsList) throws java.io.IOException
java.io.IOException
protected static void closeGraphingOutput(java.io.PrintStream graphingOutput) throws java.io.IOException
java.io.IOException
protected static long getTimeSlice(java.util.List<java.lang.String> argsList)
protected static boolean getRollupStatistics(java.util.List<java.lang.String> argsList)
protected static java.io.Reader openInput(java.util.List<java.lang.String> argsList) throws java.io.IOException
java.io.IOException
protected static void printUnknownArgs(java.util.List<java.lang.String> argsList)
protected static int getIndexOfArg(java.util.List<java.lang.String> args, boolean needsParam, java.lang.String... argNames)
protected static java.io.PrintStream openStream(java.lang.String fileName) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |