module BatchExperiment::FirstLineExtractor

A very simple sample extractor that extracts the first line of the command output, the run time and the memory usage (the last two are automatically added to any command output by ::batch and ::experiment).

Public Class Methods

extract_from_lines(lines) click to toggle source

(see BatchExperiment::Extractor#extract_from_lines)

# File lib/batch_experiment/sample_extractors.rb, line 15
def self.extract_from_lines(lines)
  [ (lines[0] or ''),
    Extractor.get_field(lines, 'ext_time'),
    Extractor.get_field(lines, 'ext_mem')
  ]
end
names() click to toggle source

(see BatchExperiment::Extractor#names)

# File lib/batch_experiment/sample_extractors.rb, line 10
def self.names
  ['first_line', 'ext_time', 'ext_mem']
end