benchmark-ips 2.7.1 → 2.7.2
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.
- checksums.yaml +4 -4
- data/History.txt +9 -0
- data/lib/benchmark/ips.rb +1 -1
- data/lib/benchmark/ips/report.rb +12 -0
- data/test/test_benchmark_ips.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feceba6a7a761d8eecc66d7a4e66e3458d0cd5fa
|
4
|
+
data.tar.gz: 5c905cacd3d45fa76abf30ac2695745f1c3a23ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5bb801ae291bab7c026f0495d460259aa5fdde347ae776630f0c8f1fe24f994da1222005c87d1cd1f4ac130edf8438c8e92a5e46d94b7a6a47022ca2fb2275
|
7
|
+
data.tar.gz: 13c64a8eb5e8aac398b3b6f258a323907e643cd9c45e1bfd6438b72fedfe55c798d6ee32489a480135ce92d919c453907bee9f468c977a9903cd06cfefc40211
|
data/History.txt
CHANGED
data/lib/benchmark/ips.rb
CHANGED
data/lib/benchmark/ips/report.rb
CHANGED
@@ -40,6 +40,18 @@ module Benchmark
|
|
40
40
|
# @return [Object] statisical summary.
|
41
41
|
attr_reader :stats
|
42
42
|
|
43
|
+
# LEGACY: Iterations per second.
|
44
|
+
# @return [Float] number of iterations per second.
|
45
|
+
def ips
|
46
|
+
@stats.central_tendency
|
47
|
+
end
|
48
|
+
|
49
|
+
# LEGACY: Standard deviation of iteration per second.
|
50
|
+
# @return [Float] standard deviation of iteration per second.
|
51
|
+
def ips_sd
|
52
|
+
@stats.error
|
53
|
+
end
|
54
|
+
|
43
55
|
# Number of Cycles.
|
44
56
|
# @return [Integer] number of cycles.
|
45
57
|
attr_reader :measurement_cycle
|
data/test/test_benchmark_ips.rb
CHANGED
@@ -55,11 +55,11 @@ class TestBenchmarkIPS < Minitest::Test
|
|
55
55
|
|
56
56
|
assert_equal "sleep 0.25", rep1.label
|
57
57
|
assert_equal 4, rep1.iterations
|
58
|
-
assert_in_delta 4.0, rep1.
|
58
|
+
assert_in_delta 4.0, rep1.ips, 0.2
|
59
59
|
|
60
60
|
assert_equal "sleep 0.05", rep2.label
|
61
61
|
assert_in_delta 20.0, rep2.iterations.to_f, 1.0
|
62
|
-
assert_in_delta 20.0, rep2.
|
62
|
+
assert_in_delta 20.0, rep2.ips, 2.0
|
63
63
|
end
|
64
64
|
|
65
65
|
def test_ips_alternate_config
|
@@ -73,7 +73,7 @@ class TestBenchmarkIPS < Minitest::Test
|
|
73
73
|
|
74
74
|
assert_equal "sleep 0.25", rep.label
|
75
75
|
assert_equal 4, rep.iterations
|
76
|
-
assert_in_delta 4.0, rep.
|
76
|
+
assert_in_delta 4.0, rep.ips, 0.4
|
77
77
|
end
|
78
78
|
|
79
79
|
def test_ips_old_config
|
@@ -85,7 +85,7 @@ class TestBenchmarkIPS < Minitest::Test
|
|
85
85
|
|
86
86
|
assert_equal "sleep 0.25", rep.label
|
87
87
|
assert_equal 4, rep.iterations
|
88
|
-
assert_in_delta 4.0, rep.
|
88
|
+
assert_in_delta 4.0, rep.ips, 0.2
|
89
89
|
end
|
90
90
|
|
91
91
|
def test_ips_config_suite
|
@@ -112,7 +112,7 @@ class TestBenchmarkIPS < Minitest::Test
|
|
112
112
|
|
113
113
|
assert_equal "sleep 0.25", rep.label
|
114
114
|
assert_equal 4*5, rep.iterations
|
115
|
-
assert_in_delta 4.0, rep.
|
115
|
+
assert_in_delta 4.0, rep.ips, 0.2
|
116
116
|
end
|
117
117
|
|
118
118
|
def test_ips_report_using_symbol
|
@@ -124,7 +124,7 @@ class TestBenchmarkIPS < Minitest::Test
|
|
124
124
|
|
125
125
|
assert_equal :sleep_a_quarter_second, rep.label
|
126
126
|
assert_equal 4*5, rep.iterations
|
127
|
-
assert_in_delta 4.0, rep.
|
127
|
+
assert_in_delta 4.0, rep.ips, 0.2
|
128
128
|
end
|
129
129
|
|
130
130
|
def test_ips_default_data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark-ips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|