theorem 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/publishers/stdout_reporter.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa09d87e0b219e171e02728791f787a6ecd68a759e8a21143e85302361f68a1d
|
4
|
+
data.tar.gz: 739e1c4e6e19a3145d7c87c8ea688d10be70cce45735939e7f5d0bdf1817d385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49ef938d77de1eacfd29a61c312acb396de525adb5c9b9699d3698cd31d8511c05665c560b55de61bc0fb9884024b32dbc61771cc0e44ae5267f26301cd46a18
|
7
|
+
data.tar.gz: 2fe7a59bec06dfd7b14c02e9245cdd0e9ca1ccf013f83254706cccd8e72a3aba9ac3048d9b0ed083b14f3d3e552c8cdd1b42ed75d24cc6ee67581740e5048f7f
|
@@ -68,7 +68,7 @@ module Theorem
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
hash = {}
|
71
|
-
hash[:percentile] = (below.size.to_f / sorted.size.to_f) * 100
|
71
|
+
hash[:percentile] = (below.size.to_f / (sorted.size.to_f + 1)) * 100
|
72
72
|
hash[:test] = test
|
73
73
|
arr << hash
|
74
74
|
end
|
@@ -90,12 +90,12 @@ module Theorem
|
|
90
90
|
return 'Not run' if test[:test].duration.nil?
|
91
91
|
|
92
92
|
str = "#{format('%<num>0.10f', num: test[:test].duration)} seconds"
|
93
|
-
rank =
|
94
|
-
if rank <
|
93
|
+
rank = test[:percentile]
|
94
|
+
if rank < 10
|
95
95
|
str.red
|
96
|
-
elsif rank >
|
96
|
+
elsif rank > 90
|
97
97
|
str.green
|
98
|
-
elsif rank <
|
98
|
+
elsif rank < 30
|
99
99
|
str.yellow
|
100
100
|
else
|
101
101
|
str
|