Class WrkSummarizerParser
- java.lang.Object
-
- hudson.plugins.performance.parsers.PerformanceReportParser
-
- hudson.plugins.performance.parsers.AbstractParser
-
- hudson.plugins.performance.parsers.WrkSummarizerParser
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PerformanceReportParser>
public class WrkSummarizerParser extends AbstractParser
Parser for wrk (https://github.com/wg/wrk)Note that Wrk does not produce request-level data, and can only be processed in it's summarized form (unless extended to do otherwise).
- Author:
- John Murray me@johnmurray.io
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WrkSummarizerParser.DescriptorImpl
static class
WrkSummarizerParser.TimeUnit
-
Nested classes/interfaces inherited from class hudson.plugins.performance.parsers.AbstractParser
AbstractParser.ObjectInputStreamWithClassMapping
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.plugins.performance.parsers.AbstractParser
filterRegex, format, isNumberDateFormat, percentiles
-
Fields inherited from class hudson.plugins.performance.parsers.PerformanceReportParser
baselineBuild, excludeResponseTime, glob, reportURL, showTrendGraphs
-
-
Constructor Summary
Constructors Constructor Description WrkSummarizerParser(String glob, String percentiles)
WrkSummarizerParser(String glob, String percentiles, String filterRegex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description hudson.plugins.performance.parsers.WrkSummarizerParser.LineType
determineLineType(String t1, String t2)
Given the first couple of tokens from a line, determine what type of line it is (by returning a LineType) so that is can be processed accordingly.String
getDefaultGlobPattern()
long
getTime(String timeString, WrkSummarizerParser.TimeUnit tu)
Given a time string (eg: 0ms, 1m, 2s, 3h, etc.) parse and yield the time in a specified time unit (millisecond, second, minute, hour)-
Methods inherited from class hudson.plugins.performance.parsers.AbstractParser
clearDateFormat, createPerformanceReport, loadSerializedReport, parse, parseTimestamp, saveSerializedReport
-
Methods inherited from class hudson.plugins.performance.parsers.PerformanceReportParser
all, getDescriptor, getReportName, isExcludeResponseTime, isShowTrendGraphs, setBaselineBuild, setExcludeResponseTime, setShowTrendGraphs
-
-
-
-
Method Detail
-
getDefaultGlobPattern
public String getDefaultGlobPattern()
- Specified by:
getDefaultGlobPattern
in classPerformanceReportParser
-
getTime
public long getTime(String timeString, WrkSummarizerParser.TimeUnit tu)
Given a time string (eg: 0ms, 1m, 2s, 3h, etc.) parse and yield the time in a specified time unit (millisecond, second, minute, hour)If no result can be returned, a 0 value will result and any errors encountered will be logged.
- Parameters:
timeString
- String representation from `wrk` command-outputtu
- Time unit to return time string in- Returns:
- Time in seconds, as parsed from input
-
determineLineType
public hudson.plugins.performance.parsers.WrkSummarizerParser.LineType determineLineType(String t1, String t2)
Given the first couple of tokens from a line, determine what type of line it is (by returning a LineType) so that is can be processed accordingly.- Parameters:
t1
- First token in the processed linet2
- Second token in the processed line- Returns:
- LineType indicating how the rest of the line should be processed
-
-