benchmark-bigo 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/benchmark/bigo/report.rb +2 -2
- data/lib/benchmark/bigo/templates/chart.erb +1 -1
- data/lib/benchmark/bigo/version.rb +1 -1
- data/test/benchmark/test_bigo.rb +8 -8
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a466690f69db149a322c590696dddfb7286787f7
|
4
|
+
data.tar.gz: 89a862c418c6f06e016c79be382439a669f7162a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518a3b218d58de17fd3054e9d0bc03166de410b0280e7c37731375e98643326431c88ff2b83cc166c28bada4446ec3ee9a32133fb6bae425e4ab876ebbc6ff92
|
7
|
+
data.tar.gz: 2663eba7e7ce0e913585ac680454f773d6dd8b853f996b98953bac60826dfeaa876a1864485c82ae5f4cd58a1e8330a9aebd152b87df3cf51baddc7ff740d9c1
|
@@ -11,11 +11,11 @@ module Benchmark
|
|
11
11
|
@entries = {}
|
12
12
|
end
|
13
13
|
|
14
|
-
def add_entry label, microseconds, iters, ips,
|
14
|
+
def add_entry label, microseconds, iters, ips, measurement_cycle
|
15
15
|
group_label = label.split(' ').first
|
16
16
|
|
17
17
|
@entries[group_label] ||= []
|
18
|
-
@entries[group_label] << Benchmark::IPS::Report::Entry.new(label, microseconds, iters, ips,
|
18
|
+
@entries[group_label] << Benchmark::IPS::Report::Entry.new(label, microseconds, iters, ips, measurement_cycle)
|
19
19
|
@entries[group_label].last
|
20
20
|
end
|
21
21
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
|
4
4
|
<script src="http://www.google.com/jsapi"></script>
|
5
5
|
<script src="http://code.highcharts.com/highcharts.js"></script>
|
6
|
-
<script src="http://
|
6
|
+
<script src="http://cdnjs.cloudflare.com/ajax/libs/chartkick/2.2.4/chartkick.js"></script>
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
|
data/test/benchmark/test_bigo.rb
CHANGED
@@ -32,7 +32,7 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
32
32
|
|
33
33
|
iterations = 1000.0 / size
|
34
34
|
assert_equal iterations.ceil, rep[i].iterations
|
35
|
-
assert_in_delta iterations, rep[i].ips, 0.
|
35
|
+
assert_in_delta iterations, rep[i].ips, iterations*0.1
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -68,8 +68,8 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
68
68
|
assert_equal "sleep 250", sleep_rep[1].label
|
69
69
|
assert_equal "sleep 450", sleep_rep[2].label
|
70
70
|
|
71
|
-
|
72
|
-
assert_in_delta 20.0, sleep_rep[0].ips,
|
71
|
+
assert_in_delta 20.0, sleep_rep[0].iterations, 1.0
|
72
|
+
assert_in_delta 20.0, sleep_rep[0].ips, 1.4
|
73
73
|
|
74
74
|
assert_equal 4, sleep_rep[1].iterations
|
75
75
|
assert_in_delta 4.0, sleep_rep[1].ips, 0.2
|
@@ -110,8 +110,8 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
110
110
|
assert_equal "sleep 250", sleep_rep[1].label
|
111
111
|
assert_equal "sleep 450", sleep_rep[2].label
|
112
112
|
|
113
|
-
|
114
|
-
assert_in_delta 20.0, sleep_rep[0].ips,
|
113
|
+
assert_in_delta 20.0, sleep_rep[0].iterations, 1.0
|
114
|
+
assert_in_delta 20.0, sleep_rep[0].ips, 1.4
|
115
115
|
|
116
116
|
assert_equal 4, sleep_rep[1].iterations
|
117
117
|
assert_in_delta 4.0, sleep_rep[1].ips, 0.2
|
@@ -119,7 +119,7 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
119
119
|
|
120
120
|
def test_bigo_generate_json
|
121
121
|
json_file = Tempfile.new 'data.json'
|
122
|
-
|
122
|
+
Benchmark.bigo do |x|
|
123
123
|
x.config(:time => 1, :warmup => 1, :steps => 2)
|
124
124
|
x.generate :array
|
125
125
|
|
@@ -140,7 +140,7 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
140
140
|
|
141
141
|
def test_bigo_generate_csv
|
142
142
|
csv_file = Tempfile.new 'data.csv'
|
143
|
-
|
143
|
+
Benchmark.bigo do |x|
|
144
144
|
x.config(:time => 1, :warmup => 1, :steps => 2)
|
145
145
|
x.generate :array
|
146
146
|
|
@@ -157,7 +157,7 @@ class TestBenchmarkBigo < MiniTest::Test
|
|
157
157
|
|
158
158
|
def test_bigo_generate_chart
|
159
159
|
chart_file = Tempfile.new 'data.html'
|
160
|
-
|
160
|
+
Benchmark.bigo do |x|
|
161
161
|
x.config(:time => 1, :warmup => 1, :steps => 2)
|
162
162
|
x.generate :array
|
163
163
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark-bigo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davy Stevenson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '12.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '12.0'
|
83
83
|
description: Benchmark objects to help calculate Big O behavior
|
84
84
|
email:
|
85
85
|
- davy.stevenson@gmail.com
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.6.13
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Benchmark objects to help calculate Big O behavior
|