Module: BuildLogParser::DurationMatcher
- Included in:
- Parser
- Defined in:
- lib/build_log_parser/matchers/duration_matcher.rb
Constant Summary collapse
- DURATION_PATTERNS =
[ /^finished in (.*)/i, /^finished tests in ([\d]\.[\d]+s),/i, /ran [\d]+ tests in (.*)\n?/i, /time: (.*), memory:/i, /[\d]+ passing (.*)/, /executed [\d]+ of [\d]+ [\w]+ \(([\d\.]+ [\w]+) /i, /^[\d]+ tests run in ([\d\.]+)\s/ ]
Instance Method Summary collapse
Instance Method Details
#fetch_duration(str) ⇒ Object
13 14 15 |
# File 'lib/build_log_parser/matchers/duration_matcher.rb', line 13 def fetch_duration(str) DURATION_PATTERNS.map { |p| scan_duration(str, p) }.compact.reduce(:+) end |