benchmark-http 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a53d525fad87d3fd01937e054c06f70afd6863e1ead842c02f1457aed6046e8
4
- data.tar.gz: 5f008ffaa18ce21f8b91beaea253c334f929ef5d0e7dfbecb87ee5f17cb2f0a0
3
+ metadata.gz: 1ef251d13a8e0a6c8966d03056203fb57b465f5a110f602fabd208232f06cd69
4
+ data.tar.gz: fabf1b8be4f2f21a74dd8a626c9a2d1d99bed5e6eb6161b49ae629c19b24790e
5
5
  SHA512:
6
- metadata.gz: 2258aa956ac4bf36560954aa0f517f938f5fb8c5348cd0c60994b846cb6489c6a859a76fe1de8fe62faab5a912691f20b9e8f72b221c1c7b23b098fd79ae1fc1
7
- data.tar.gz: 9399cb6ffe0220222ee2b67f3949ff5e287286ad2e9ea1e06adf1438ed13ae9a5856913bf7787b0b97e8700e58cdee182c28fe983bcadc1224345226440ef4e2
6
+ metadata.gz: 8c61036734fbd5642c63ced591f049d77cf37a6849953f80150000b2c3d318d5a700d90ccc238d23793700dc27909a1dc37ed01e7d1924af6ebca8e0d931f984
7
+ data.tar.gz: a8a0ae66402b1bf147bcab1af6ab2a73d7cf0654ea345466ec9baa972ccc87cbe6a7c5d426869e334de92f31cefbe07fdf1a41b67aea6df42b174a2d47add62a
@@ -71,7 +71,12 @@ module Benchmark
71
71
  end
72
72
 
73
73
  async def fetch(statistics, client, url, depth = @depth, fetched = Set.new, &block)
74
- return if fetched.include?(url) or depth == 0
74
+ if depth.zero?
75
+ Async.logger.warn(self) {"Exceeded depth while trying to visit #{url}!"}
76
+ return
77
+ elsif fetched.include?(url)
78
+ return
79
+ end
75
80
 
76
81
  fetched << url
77
82
 
@@ -84,11 +89,11 @@ module Benchmark
84
89
  if response.redirection?
85
90
  location = url + response.headers['location']
86
91
  if location.host == url.host
87
- Async.logger.info(self) {"Following redirect to #{location}..."}
92
+ Async.logger.debug(self) {"Following redirect to #{location}..."}
88
93
  fetch(statistics, client, location, depth-1, fetched, &block).wait
89
94
  return
90
95
  else
91
- Async.logger.info(self) {"Ignoring redirect to #{location}."}
96
+ Async.logger.debug(self) {"Ignoring redirect to #{location}."}
92
97
  return
93
98
  end
94
99
  end
@@ -72,7 +72,7 @@ module Benchmark
72
72
  end
73
73
 
74
74
  def valid?
75
- @samples.size > 1
75
+ @samples.size > 0
76
76
  end
77
77
 
78
78
  # Computes Population Variance, σ^2.
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Benchmark
22
22
  module HTTP
23
- VERSION = "0.11.0"
23
+ VERSION = "0.11.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-09 00:00:00.000000000 Z
11
+ date: 2020-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io