Class: Memtf::Runner
- Inherits:
-
Object
- Object
- Memtf::Runner
- Defined in:
- lib/memtf/runner.rb
Overview
Encapsulates the multiple steps required to accomplish Memtf analysis and reporting.
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Class Method Summary collapse
-
.run(stage, options = {}) ⇒ Object
Run the Memtf analysis and reporting.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
-
#run(stage) ⇒ Memtf::Runner
Run the Memtf analysis and reporting.
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
14 15 16 17 |
# File 'lib/memtf/runner.rb', line 14 def initialize(={}) @group = .delete(:group) || Time.now.to_i @options = end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
4 5 6 |
# File 'lib/memtf/runner.rb', line 4 def group @group end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/memtf/runner.rb', line 4 def @options end |
#report ⇒ Object (readonly)
Returns the value of attribute report.
4 5 6 |
# File 'lib/memtf/runner.rb', line 4 def report @report end |
Class Method Details
.run(stage, options = {}) ⇒ Object
Run the Memtf analysis and reporting.
10 11 12 |
# File 'lib/memtf/runner.rb', line 10 def self.run(stage, ={}) new().run(stage) end |
Instance Method Details
#run(stage) ⇒ Memtf::Runner
Run the Memtf analysis and reporting.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/memtf/runner.rb', line 23 def run(stage) analysis = Memtf::Analyzer.analyze() Memtf::Persistance.save(stage, group, analysis) analysis = nil if stage == Memtf::STOP @report = Memtf::Reporter.report(group) puts @report end self end |