pwrake 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pwrake/report/stat.rb +13 -2
- data/lib/pwrake/report/task_stat.rb +1 -1
- data/lib/pwrake/version.rb +1 -1
- 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: 5e0d716aa3c0635e1f7f5d2d909be08c11111d16
|
4
|
+
data.tar.gz: 83fee38f2963525d1b14e08da03cece13560805a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ba08ad059954bfb25e0146ad9ec0adbfce7aaf05072b745c69a1e071ee7ec1a6ff3b673f38256e9e0875b0aaceb3d75802e5a1d2451576483d53213758dbed
|
7
|
+
data.tar.gz: 3cb1c4c934b3a72ab318768fd68247726974186404956b461999420df14fe68daa24736556a299c137d45a48eb8f3415810c177c07e46599ceaa5912a9bab3c2
|
data/lib/pwrake/report/stat.rb
CHANGED
@@ -28,6 +28,7 @@ module Pwrake
|
|
28
28
|
attr_reader :hist, :hist_min, :hist_max, :bin
|
29
29
|
|
30
30
|
def make_logx_histogram(bin)
|
31
|
+
if @min>0
|
31
32
|
@bin = bin # 1.0/10
|
32
33
|
@i_max = (Math.log10(@max)/@bin).floor
|
33
34
|
@i_min = (Math.log10(@min)/@bin).floor
|
@@ -39,6 +40,7 @@ module Pwrake
|
|
39
40
|
raise "invalid index i=#{i}" if i<0 || i>@i_max-@i_min
|
40
41
|
@hist[i] += 1
|
41
42
|
end
|
43
|
+
end
|
42
44
|
end
|
43
45
|
|
44
46
|
def hist_each
|
@@ -89,9 +91,18 @@ module Pwrake
|
|
89
91
|
[@n, @mean, @median, @min, @max, @sdev||0]
|
90
92
|
end
|
91
93
|
|
94
|
+
def fmt(x)
|
95
|
+
case x
|
96
|
+
when Numeric
|
97
|
+
"%g"%x
|
98
|
+
else
|
99
|
+
x.to_s
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
92
103
|
def html_td
|
93
|
-
"<td>%i</td><td>%
|
94
|
-
[@n, @mean, @median, @min, @max, @sdev
|
104
|
+
"<td>%i</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>" %
|
105
|
+
[@n, fmt(@mean), fmt(@median), fmt(@min), fmt(@max), fmt(@sdev)]
|
95
106
|
end
|
96
107
|
|
97
108
|
def self.html_th
|
data/lib/pwrake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro TANAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|