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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a25b95fd253853b4dcb8eac1d3c5372b00cbbc96
4
- data.tar.gz: 2896959d98b7940cc4356235445c83f0542d3774
3
+ metadata.gz: 2f5a409796fd415a0897034618034f1e66a4cbde
4
+ data.tar.gz: 91fc6461c7ad3b6af5c8d5d2c9ddae22055fc456
5
5
  SHA512:
6
- metadata.gz: 914444b4ab661020a650807a46e6d265b995f60ae5e4165edf97a77f1dced190ae9abe2a3481be84469bc4818c50b99c50e53d1d418817faf5ca79ed342ea80a
7
- data.tar.gz: 1395e307e3e0aa9e9e068b67af18d0abc7695b31969615f4e485ce02353496b5ecfee588a7708f6f5bf75f46fd231d372a70d17828eff13dc0667386ce21e317
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
- average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.collect(&:time).sum.fdiv(values.size)*1000
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
- average_time_data[Time.at(key).utc.strftime("%H:%M:%S")] = values.collect(&:time).inject(0){|sum,x| sum + x }.fdiv(values.size)*1000
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(
@@ -1,3 +1,3 @@
1
1
  module GasLoadTester
2
- VERSION = "1.0.12"
2
+ VERSION = "1.0.13"
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.12
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-28 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-progressbar