public class ResponseTimeLogParser extends Object
URL date_in_milliseconds time_taken [status_code [IP_address]]
This is the output format used by the Apache RT module, as well as the servlet RT filter.| Modifier and Type | Class and Description |
|---|---|
class |
ResponseTimeLogParser.LogEntry |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TIME_MULTIPLIER |
protected List<Pattern> |
excludes |
protected org.apache.commons.logging.Log |
log |
protected File |
logFile |
protected List<RegexSubstitution> |
transforms |
| Constructor and Description |
|---|
ResponseTimeLogParser(File logFile) |
ResponseTimeLogParser(File logFile,
double timeMultiplier) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
applyTransforms(String url) |
List<Pattern> |
getExcludes() |
File |
getLogFile() |
double |
getTimeMultiplier() |
List<RegexSubstitution> |
getTransforms() |
protected boolean |
isExcluded(String url) |
protected ResponseTimeLogParser.LogEntry |
parseLine(String line)
Parses a line from a response time log and returns a LogEntry.
|
void |
parseLog(org.rhq.core.domain.measurement.calltime.CallTimeData callTimeData)
Parse the log file, starting at the offset corresponding to the file's size after the last time this method was
called.
|
void |
setExcludes(List<Pattern> excludes) |
void |
setLogFile(File logFile) |
void |
setTransforms(List<RegexSubstitution> transforms) |
public static final int DEFAULT_TIME_MULTIPLIER
protected final org.apache.commons.logging.Log log
protected File logFile
protected List<RegexSubstitution> transforms
public ResponseTimeLogParser(File logFile)
public ResponseTimeLogParser(File logFile, double timeMultiplier)
public void parseLog(org.rhq.core.domain.measurement.calltime.CallTimeData callTimeData)
throws IOException
callTimeData - the parsed response-time data will be added to this objectIOException - if an error occurs reading the log fileprotected boolean isExcluded(String url)
@NotNull protected ResponseTimeLogParser.LogEntry parseLine(String line) throws Exception
line - the line to be parsedException - if parsing of the line failspublic File getLogFile()
public void setLogFile(File logFile)
public double getTimeMultiplier()
public List<RegexSubstitution> getTransforms()
public void setTransforms(List<RegexSubstitution> transforms)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.