gas_load_tester 1.0.2 → 1.0.3
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 -1
- 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: cab6ad84a7bbd75cd800c1f4e79c54823bdb832b
|
4
|
+
data.tar.gz: ac638b93c650b3673131d4c16e5ce406c80df8d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3983ddccf3a2ec1b159fd933215ab4b4e01584957598e092680343e2b8e2c0552345658f9938a358f1b12fb6d4c7dc05d248448dc345fbd201004e7cf051a1a2
|
7
|
+
data.tar.gz: a330dd9a1aa6e66baddaa45ea563cd4deceb5a7029840c6a368f688f1b8400a039624ce60484761b10fcc27fd9e2c8a6d00dc9eafa9722e7d5d1ec8c5be9431b
|
@@ -201,7 +201,11 @@ module GasLoadTester
|
|
201
201
|
clients_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.count
|
202
202
|
pass_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.select{|val| val.pass }.count
|
203
203
|
error_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.select{|val| !val.pass }.count
|
204
|
-
|
204
|
+
if RUBY_VERSION >= "2.4.0"
|
205
|
+
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.collect(&:time).sum.fdiv(values.size)*1000
|
206
|
+
else
|
207
|
+
average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.collect(&:time).inject(0){|sum,x| sum + x }.fdiv(values.size)*1000
|
208
|
+
end
|
205
209
|
}
|
206
210
|
|
207
211
|
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.3
|
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-01-
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-progressbar
|