gas_load_tester 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gas_load_tester/chart_builder.rb +5 -12
- data/lib/gas_load_tester/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: 2f5a409796fd415a0897034618034f1e66a4cbde
|
4
|
+
data.tar.gz: 91fc6461c7ad3b6af5c8d5d2c9ddae22055fc456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c34ab8909982168095e8659cd5525f92ff251cfe5ac60024c2398a453292d356350876488e24a379590bdbce3b384467c535f06dd425e3322681b2678db2547
|
7
|
+
data.tar.gz: bbb697ddd8a7735d1618fe0ab0baa2e6b87c0c31d3e3f4ee56be0e4c75339568ed2d52a01e788050f08f5ce5ef184f3e486f7f71c271f09ae9caa20bcc5973e3
|
@@ -219,20 +219,13 @@ module GasLoadTester
|
|
219
219
|
pass_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.select{|val| val.pass }.count
|
220
220
|
error_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.select{|val| !val.pass }.count
|
221
221
|
if RUBY_VERSION >= "2.4.0"
|
222
|
-
|
223
|
-
if average_time_data[Time.at(key).utc.strftime("%H:%M:%S")].to_f.nan?
|
224
|
-
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] == 0
|
225
|
-
elsif average_time_data[Time.at(key).utc.strftime("%H:%M:%S")].infinite?
|
226
|
-
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = 0
|
227
|
-
end
|
222
|
+
val = values.collect(&:time).sum.fdiv(values.size)*1000
|
228
223
|
else
|
229
|
-
|
230
|
-
if average_time_data[Time.at(key).utc.strftime("%H:%M:%S")].to_f.nan?
|
231
|
-
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] == 0
|
232
|
-
elsif average_time_data[Time.at(key).utc.strftime("%H:%M:%S")].infinite?
|
233
|
-
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = 0
|
234
|
-
end
|
224
|
+
val = values.collect(&:time).inject(0){|sum,x| sum + x }.fdiv(values.size)*1000
|
235
225
|
end
|
226
|
+
val = 0 if val.to_f.nan?
|
227
|
+
val = 0 if val.infinite?
|
228
|
+
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = val
|
236
229
|
}
|
237
230
|
|
238
231
|
line_chart(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gas_load_tester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanapat Sainak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-progressbar
|