wdbomber 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/exe/wdbomber +3 -2
- data/lib/wdbomber/version.rb +1 -1
- data/lib/wdbomber.rb +12 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a747bc8cddc1b9d20718682f4faeb968d1ea05a111cf314645ec1222f020d6
|
4
|
+
data.tar.gz: 68a002a76530ecf98f4bc2274698eb15c50c1bf04a069ec72d8b9fb92363cf4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c79f86890a6ffbb6fb5113d867de32db64430b50cb09589ed84b2e3b2c9054c602bd87741d4556168c82f15feebbbf13e66b83794a0c530ed0ca2ed3025ce7a
|
7
|
+
data.tar.gz: ba30856aa14176651b7881ea73a26324b8070f5130bb85a35876eac091c8ec36032021ab23b2a594b596dc1d05f06f51f9d2f60e9b25039de2a770689c0cf811
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/exe/wdbomber
CHANGED
@@ -11,7 +11,7 @@ STDOUT.sync = true
|
|
11
11
|
require 'wdbomber'
|
12
12
|
|
13
13
|
unless ARGV[0]
|
14
|
-
puts "wdbomber URL iterations concurrency actions"
|
14
|
+
puts "wdbomber URL iterations concurrency actions rampup"
|
15
15
|
exit 1
|
16
16
|
end
|
17
17
|
|
@@ -19,5 +19,6 @@ endpoint = ARGV[0]
|
|
19
19
|
iterations = ARGV[1] ? Integer(ARGV[1]) : 0
|
20
20
|
concurrency = ARGV[2] ? Integer(ARGV[2]) : 1
|
21
21
|
actions = ARGV[3] ? Integer(ARGV[3]) : 1
|
22
|
+
rampup = ARGV[4] ? Integer(ARGV[4]) : nil
|
22
23
|
|
23
|
-
Wdbomber.run! endpoint, iterations: iterations, concurrency: concurrency, actions: actions
|
24
|
+
Wdbomber.run! endpoint, iterations: iterations, concurrency: concurrency, actions: actions, rampup: rampup
|
data/lib/wdbomber/version.rb
CHANGED
data/lib/wdbomber.rb
CHANGED
@@ -12,8 +12,12 @@ Signal.trap("INT") {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
module Wdbomber
|
15
|
-
def self.run!(endpoint, iterations:, concurrency:1, concurrency_delay:0, actions:1)
|
16
|
-
STDERR.puts "attacking #{endpoint}
|
15
|
+
def self.run!(endpoint, iterations:, concurrency:1, concurrency_delay:0, actions:1, rampup: nil)
|
16
|
+
STDERR.puts "attacking #{endpoint}"
|
17
|
+
STDERR.puts " iterations: #{iterations}"
|
18
|
+
STDERR.puts " concurrency: #{concurrency}"
|
19
|
+
STDERR.puts " actions: #{actions}"
|
20
|
+
STDERR.puts " rampup: #{rampup}"
|
17
21
|
|
18
22
|
desired_capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
19
23
|
if ENV["SUPERBOT_REGION"]
|
@@ -27,6 +31,12 @@ module Wdbomber
|
|
27
31
|
sleep t*concurrency_delay #for specs
|
28
32
|
|
29
33
|
threads << Thread.new do
|
34
|
+
if rampup
|
35
|
+
my_rampup = rand(rampup).floor
|
36
|
+
puts "#{bomber}: starting after #{my_rampup} rampup"
|
37
|
+
sleep my_rampup
|
38
|
+
puts "#{bomber}: started"
|
39
|
+
end
|
30
40
|
iterations.times do |i|
|
31
41
|
if $SHUTDOWN_REQUESTED
|
32
42
|
puts "#{bomber}: SHUTDOWN"
|