Class 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
  • Constructor Details

    • WrkSummarizerParser

      public WrkSummarizerParser(String glob, String percentiles)
    • WrkSummarizerParser

      @DataBoundConstructor public WrkSummarizerParser(String glob, String percentiles, String filterRegex)
  • Method Details

    • getDefaultGlobPattern

      public String getDefaultGlobPattern()
      Specified by:
      getDefaultGlobPattern in class PerformanceReportParser
    • 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-output
      tu - 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 line
      t2 - Second token in the processed line
      Returns:
      LineType indicating how the rest of the line should be processed