Module: BatchExperiment::WcExtractor
- Extended by:
- Extractor
- Defined in:
- lib/batch_experiment/sample_extractors.rb
Class Method Summary
collapse
Methods included from Extractor
extract, extract_from_lines, get_field, get_hfield, names
Class Method Details
24
25
26
27
28
29
30
31
32
|
# File 'lib/batch_experiment/sample_extractors.rb', line 24
def self.(content)
arr = content.split(' ')
qt_lines, words, bytes = arr[0], arr[1], arr[2]
lines = content.lines.map! { | l | l.chomp! }
[ qt_lines, words, bytes,
Extractor.get_field(lines, 'ext_time'),
Extractor.get_field(lines, 'ext_mem')
]
end
|
.names ⇒ Object
20
21
22
|
# File 'lib/batch_experiment/sample_extractors.rb', line 20
def self.names
['lines', 'words', 'bytes', 'ext_time', 'ext_mem']
end
|