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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e0a74642bbf788cbe3124a5c90a108920b93d62
4
- data.tar.gz: a949f1f24de49c05dcf961d1533d8615fd7dd35f
3
+ metadata.gz: cab6ad84a7bbd75cd800c1f4e79c54823bdb832b
4
+ data.tar.gz: ac638b93c650b3673131d4c16e5ce406c80df8d3
5
5
  SHA512:
6
- metadata.gz: 920deb3346ebdd10e119614c087ed589007ec74817ea2dfee6028731aff3019cc743be974df7573b6ef669288855ae9c6e28c9658af190a7b225a76a1c0b3a46
7
- data.tar.gz: 5335032a8eed7682526d1c901645e013806af70aa482738504473e527e0936134f2551261a44f35bd0f35bd37ee99c585fe12ddaa497d2c36c48e9c3c8b012f2
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
- average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.collect(&:time).sum.fdiv(values.size)*1000
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(
@@ -1,3 +1,3 @@
1
1
  module GasLoadTester
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
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.2
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-20 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-progressbar