org.HdrHistogram
Class HistogramLogProcessor

java.lang.Object
  extended by java.lang.Thread
      extended by org.HdrHistogram.HistogramLogProcessor
All Implemented Interfaces:
Runnable

public class HistogramLogProcessor
extends Thread

HistogramLogProcessor will process an input log and [can] generate two separate log files from a single histogram log file: a sequential interval log file and a histogram percentile distribution log file.

The sequential interval log file logs a single stats summary line for each reporting interval.

The histogram percentile distribution log file includes a detailed percentiles and fine grained distribution of the entire log file range processed.

HistogramLogProcessor will process an input log file when provided with the -i <filename> option. When no -i option is provided, standard input will be processed.

When provided with an output file name <logfile> with the -o option (e.g. "-o mylog"), HistogramLogProcessor will produce both output files under the names <logfile> and <logfile>.hgrm (e.g. mylog and mylog.hgrm).

When not provided with an output file name, HistogramLogProcessor will produce [only] the histogram percentile distribution log output to standard output.

HistogramLogProcessor accepts optional -start and -end time range parameters. When provided, the output will only reflect the portion of the input log with timestamps that fall within the provided start and end time range parameters.

HistogramLogProcessor also accepts and optional -csv parameter, which will cause the output formatting (of both output file forms) to use a CSV file format.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String versionString
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HistogramLogProcessor(String[] args)
          Construct a HistogramLogProcessor with the given arguments (provided in command line style).
 
Method Summary
static void main(String[] args)
          main() method.
 void run()
          Run the log processor with the currently provided arguments.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionString

public static final String versionString
See Also:
Constant Field Values
Constructor Detail

HistogramLogProcessor

public HistogramLogProcessor(String[] args)
                      throws FileNotFoundException
Construct a HistogramLogProcessor with the given arguments (provided in command line style).
 [-h]                        help
 [-csv]                      Use CSV format for output log files
 [-i logFileName]            File name of Histogram Log to process (default is standard input)
 [-o outputFileName]         File name to output to (default is standard output)
                             (will replace occurrences of %pid and %date with appropriate information)
 [-start rangeStartTimeSec]  The start time for the range in the file, in seconds (default 0.0)
 [-end rangeEndTimeSec]      The end time for the range in the file, in seconds (default is infinite)
 [-outputValueUnitRatio r]   The scaling factor by which to divide histogram recorded values units
                             in output. [default = 1000000.0 (1 msec in nsec)]"
 

Parameters:
args - command line arguments
Throws:
FileNotFoundException - if specified input file is not found
Method Detail

run

public void run()
Run the log processor with the currently provided arguments.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

main

public static void main(String[] args)
main() method.

Parameters:
args - command line arguments


Copyright © 2014. All rights reserved.