Class: Drnbench::RequestResponse::ProgressiveRunner::Result
- Inherits:
-
Object
- Object
- Drnbench::RequestResponse::ProgressiveRunner::Result
- Defined in:
- lib/drnbench/request-response/progressive-runner.rb
Instance Method Summary collapse
- #<<(result) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ Result
constructor
A new instance of Result.
- #statuses ⇒ Object
- #to_csv ⇒ Object
Constructor Details
#initialize ⇒ Result
Returns a new instance of Result.
53 54 55 |
# File 'lib/drnbench/request-response/progressive-runner.rb', line 53 def initialize @results = {} end |
Instance Method Details
#<<(result) ⇒ Object
57 58 59 60 |
# File 'lib/drnbench/request-response/progressive-runner.rb', line 57 def <<(result) @statuses = nil @results[result.n_clients] = result end |
#empty? ⇒ Boolean
62 63 64 |
# File 'lib/drnbench/request-response/progressive-runner.rb', line 62 def empty? @results.empty? end |
#statuses ⇒ Object
66 67 68 |
# File 'lib/drnbench/request-response/progressive-runner.rb', line 66 def statuses @statuses ||= prepare_statuses end |
#to_csv ⇒ Object
70 71 72 73 74 |
# File 'lib/drnbench/request-response/progressive-runner.rb', line 70 def to_csv ([csv_header] + csv_body).collect do |row| CSV.generate_line(row) end.join("") end |