autoperf 1.1.0beta1 → 1.1.0beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,37 @@
1
- class Autoperf::Display
2
- class Console
3
- def initialize results, report=nil
4
- @table = if report.kind_of?(Array)
5
- table_from_array(report)
6
- elsif report.kind_of?(Ruport::Data::Table)
7
- report
8
- else
9
- # ignore input and use defaults
10
- table_from_array(::Autoperf::Display::DEFAULT_FIELDS)
11
- end
12
- results.each do |rate, result|
13
- result.merge!(:rate => rate) if @table.column_names.include?(:rate)
14
- @table << result
1
+ class Autoperf
2
+ class Display
3
+ class Console
4
+ def initialize results, report=nil
5
+ @table = if report.kind_of?(Array)
6
+ table_from_array(report)
7
+ elsif report.kind_of?(Ruport::Data::Table)
8
+ report
9
+ else
10
+ # ignore input and use defaults
11
+ table_from_array(::Autoperf::Display::DEFAULT_FIELDS)
12
+ end
13
+ results.each do |rate, result|
14
+ result.merge!(:rate => rate) if @table.column_names.include?(:rate)
15
+ @table << result
16
+ end
17
+ @table
15
18
  end
16
- @table
17
- end
18
19
 
19
- def table
20
- @table
21
- end
20
+ def table
21
+ @table
22
+ end
22
23
 
23
- def to_s
24
- @table.to_s
25
- end
24
+ def to_s
25
+ @table.to_s
26
+ end
26
27
 
27
- def print
28
- puts to_s
29
- end
28
+ def print
29
+ puts to_s
30
+ end
30
31
 
31
- def table_from_array report
32
- Table(:column_names => report)
32
+ def table_from_array report
33
+ Table(:column_names => report)
34
+ end
33
35
  end
34
36
  end
35
37
  end
@@ -1,19 +1,21 @@
1
- class Autoperf::Display
2
- class CSV
3
- def initialize results, report=nil
4
- @table = ::Autoperf::Display::Console.new(results, report).table
5
- end
1
+ class Autoperf
2
+ class Display
3
+ class CSV
4
+ def initialize results, report=nil
5
+ @table = ::Autoperf::Display::Console.new(results, report).table
6
+ end
6
7
 
7
- def to_s
8
- @table.to_csv
9
- end
8
+ def to_s
9
+ @table.to_csv
10
+ end
10
11
 
11
- def to_csv
12
- to_s
13
- end
12
+ def to_csv
13
+ to_s
14
+ end
14
15
 
15
- def print
16
- puts to_s
16
+ def print
17
+ puts to_s
18
+ end
17
19
  end
18
20
  end
19
21
  end
@@ -1,25 +1,27 @@
1
- class Autoperf::Display
2
- class JSON
3
- def initialize(results, fields=nil)
4
- @results = []
5
- fields ||= ::Autoperf::Display::DEFAULT_FIELDS
6
- results.each do |rate, result|
7
- result.keep_if { |k,v| fields.include?(k) }
8
- result.merge!(:rate => rate) if fields.include?(:rate)
9
- @results.push(result)
1
+ class Autoperf
2
+ class Display
3
+ class JSON
4
+ def initialize(results, fields=nil)
5
+ @results = []
6
+ fields ||= ::Autoperf::Display::DEFAULT_FIELDS
7
+ results.each do |rate, result|
8
+ result.keep_if { |k,v| fields.include?(k) }
9
+ result.merge!(:rate => rate) if fields.include?(:rate)
10
+ @results.push(result)
11
+ end
10
12
  end
11
- end
12
13
 
13
- def to_s
14
- to_json
15
- end
14
+ def to_s
15
+ to_json
16
+ end
16
17
 
17
- def to_json
18
- @results.to_json
19
- end
18
+ def to_json
19
+ @results.to_json
20
+ end
20
21
 
21
- def print
22
- puts ::JSON.pretty_generate(@results)
22
+ def print
23
+ puts ::JSON.pretty_generate(@results)
24
+ end
23
25
  end
24
26
  end
25
27
  end
@@ -1,3 +1,3 @@
1
1
  class Autoperf
2
- VERSION = "1.1.0beta1"
2
+ VERSION = "1.1.0beta2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoperf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0beta1
4
+ version: 1.1.0beta2
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors: