sippy_cup 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/README.markdown +24 -15
- data/Rakefile +2 -0
- data/lib/sippy_cup/runner.rb +7 -4
- data/lib/sippy_cup/version.rb +1 -1
- data/spec/sippy_cup/runner_spec.rb +31 -5
- 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: ec38982988f13808a01d0edb5d995d05235d5000
|
4
|
+
data.tar.gz: 18b80cca252826d0790c2152b0e72b507610a804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed52b5856e8df516dbeaf1da79ca86ece5f83f76b8e414cce292bc09b3c77fca976150b1980486460562f3166125f38f0bee8a23eaf694cde97a0959dd48c702
|
7
|
+
data.tar.gz: be9366e3fe1c86649c361c79bd265a0608ad8195843bce5d9dbc1797fff60f69419b3dfcea2aaab02cdfcdf52f1124ddab63cf5584925cb3a0c1484c5531e1ac
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# develop
|
2
2
|
|
3
|
+
# [0.6.0](https://github.com/mojolingo/sippy_cup/compare/v0.5.0...v0.6.0)
|
4
|
+
* Change: Call limits (`number_of_calls`, `concurrent_max` and `calls_per_second`) no longer have default values for simplicity of UAS scenarios. The value of `to_user` now defaults to the SIPp default of `s`.
|
5
|
+
* Feature: Support for setting rate scaling independently of reporting frequency via the new `calls_per_second_interval` option. See also https://github.com/SIPp/sipp/pull/107 and https://github.com/SIPp/sipp/pull/126.
|
6
|
+
|
3
7
|
# [0.5.0](https://github.com/mojolingo/sippy_cup/compare/v0.4.1...v0.5.0)
|
4
8
|
SYNTAX CHANGES!
|
5
9
|
This is a backward incompatible change. If upgrading from Sippy Cup 0.4.x please see the [documentation](http://mojolingo.github.io/sippy_cup/#available-scenario-steps) and the `Change` items below.
|
data/README.markdown
CHANGED
@@ -34,7 +34,7 @@ Sippy Cup is a tool to generate [SIPp](http://sipp.sourceforge.net/) load test p
|
|
34
34
|
SippyCup relies on the following to generate scenarios and the associated media PCAP files:
|
35
35
|
|
36
36
|
* Ruby 1.9.3 or later (2.1.2 recommended)
|
37
|
-
* [SIPp](http://sipp.sourceforge.net/) - Download from
|
37
|
+
* [SIPp](http://sipp.sourceforge.net/) latest master branch - Download from https://github.com/sipp/sipp - NOTE: Version SIPp version 3.4 may work, but will be missing certain new Sippy Cup features, such as rate scaling
|
38
38
|
* "root" user access via sudo: needed to run SIPp so it can bind to raw network sockets
|
39
39
|
|
40
40
|
## Installation
|
@@ -199,49 +199,58 @@ Each parameter has an impact on the test, and may either be changed once the XML
|
|
199
199
|
<dd>Frequency (in seconds) of statistics collections. Defaults to 10. Has no effect unless :stats_file is also specified</dd>
|
200
200
|
|
201
201
|
<dt>from_user</dt>
|
202
|
-
<dd>SIP user from which traffic should appear.
|
202
|
+
<dd>SIP user from which traffic should appear. Default: sipp</dd>
|
203
203
|
|
204
204
|
<dt>to_user</dt>
|
205
|
-
<dd>SIP user to send requests to. Defaults to
|
205
|
+
<dd>SIP user to send requests to. Defaults to SIPp's default: `s` (as in `s@127.0.0.1`)</dd>
|
206
206
|
|
207
207
|
<dt>transport</dt>
|
208
|
-
<dd>Specify the SIP transport. Valid options are `udp` (default) or `tcp
|
208
|
+
<dd>Specify the SIP transport. Valid options are `udp` (default) or `tcp`. Default: `udp`</dd>
|
209
209
|
|
210
210
|
<dt>full_sipp_output</dt>
|
211
|
-
<dd>By default, SippyCup will show SIPp's command line output while running a scenario. Set this parameter to `false` to hide full command line output
|
211
|
+
<dd>By default, SippyCup will show SIPp's command line output while running a scenario. Set this parameter to `false` to hide full command line output. Default: `true`</dd>
|
212
212
|
|
213
213
|
<dt>summary_report_file</dt>
|
214
|
-
<dd>Write a summary of the SIPp run to the specified file. This summary is the output from the SIPp `-trace_screen` command.
|
214
|
+
<dd>Write a summary of the SIPp run to the specified file. This summary is the output from the SIPp `-trace_screen` command. Default: unused</dd>
|
215
215
|
|
216
216
|
<dt>errors_report_file</dt>
|
217
|
-
<dd>Record SIPp's errors to the specified file. This report is the output from the SIPp `-trace_err` command
|
217
|
+
<dd>Record SIPp's errors to the specified file. This report is the output from the SIPp `-trace_err` command. Default: unused</dd>
|
218
218
|
|
219
219
|
<dt>options</dt>
|
220
|
-
<dd>A string of SIPp command line options included with the SIPp run
|
220
|
+
<dd>A string of SIPp command line options included with the SIPp run. Default: none</dd>
|
221
221
|
|
222
222
|
<dt>media_port</dt>
|
223
|
-
<dd>By default, SIPp assigns RTP ports dynamically. However, if there is a need for a static RTP port (say, for data collection purposes), it can be done by supplying a port number here
|
223
|
+
<dd>By default, SIPp assigns RTP ports dynamically. However, if there is a need for a static RTP port (say, for data collection purposes), it can be done by supplying a port number here. Default: SIPp's default of 6000</dd>
|
224
224
|
|
225
225
|
<dt>dtmf_mode</dt>
|
226
226
|
<dd>Specify the mechanism by which DTMF is signaled. Valid options are `rfc2833` for within the RTP media, or `info` for SIP INFO. Default: rfc2833</dd>
|
227
227
|
|
228
228
|
<dt>scenario_variables</dt>
|
229
|
-
<dd>If you're using sippy_cup to run a SIPp XML file, there may be CSV fields in the scenario ([field0], [field1], etc.). Specify a path to a CSV file containing the required information using this option. (File is semicolon delimeted, information can be found [here](http://sipp.sourceforge.net/doc/reference.html#inffile).)</dd>
|
229
|
+
<dd>If you're using sippy_cup to run a SIPp XML file, there may be CSV fields in the scenario ([field0], [field1], etc.). Specify a path to a CSV file containing the required information using this option. (File is semicolon delimeted, information can be found [here](http://sipp.sourceforge.net/doc/reference.html#inffile).) Default: unused</dd>
|
230
|
+
|
231
|
+
<dt>number_of_calls</dt>
|
232
|
+
<dd>The total number of calls permitted for the entire test. When this limit is reached, the test is over. Defaults to none - test will run forever until manually stopped</dd>
|
233
|
+
|
234
|
+
<dt>number_of_calls</dt>
|
235
|
+
<dd>The total number of calls permitted for the entire test. When this limit is reached, the test is over. Defaults to nil.</dd>
|
230
236
|
|
231
237
|
<dt>concurrent_max</dt>
|
232
|
-
<dd>The maximum number of calls permitted to be active at any given time. When this limit is reached, SIPp will slow down or stop sending new calls until there it falls below the limit.
|
238
|
+
<dd>The maximum number of calls permitted to be active at any given time. When this limit is reached, SIPp will slow down or stop sending new calls until there it falls below the limit. Defaults to SIPp's default: (3 * call_duration (seconds) * calls_per_second)</dd>
|
233
239
|
|
234
240
|
<dt>calls_per_second</dt>
|
235
|
-
<dd>The rate at which new calls should be created. Note that SIPp will automatically adjust this downward to stay at or beneath the maximum number of concurrent calls (`concurrent_max`).
|
241
|
+
<dd>The rate at which new calls should be created. Note that SIPp will automatically adjust this downward to stay at or beneath the maximum number of concurrent calls (`concurrent_max`). Defaults to SIP's default of 10</dt>
|
236
242
|
|
237
243
|
<dt>calls_per_second_incr</dt>
|
238
|
-
<dd>When used with `calls_per_second_max`, tells SIPp the amount by which
|
244
|
+
<dd>When used with `calls_per_second_max`, tells SIPp the amount by which `calls_per_second` should be incremented. CPS rate is adjusted each `calls_per_second_interval`. Default: 1.</dd>
|
245
|
+
|
246
|
+
<dt>calls_per_second_interval</dt>
|
247
|
+
<dd>When used with `calls_per_second_max`, tells SIPp the time interval (in seconds) by which calls-per-second should be incremented. Default: Unset; SIPp's default (60s). NOTE: Requires a development build of SIPp; see https://github.com/SIPp/sipp/pull/107</dd>
|
239
248
|
|
240
249
|
<dt>calls_per_second_max</dt>
|
241
|
-
<dd>The maximum rate of calls-per-second.
|
250
|
+
<dd>The maximum rate of calls-per-second. Default: unused (`calls_per_second` will not change)</dd>
|
242
251
|
|
243
252
|
<dt>advertise_address</dt>
|
244
|
-
<dd>The IP address to advertise in SIP and SDP if different from the bind IP
|
253
|
+
<dd>The IP address to advertise in SIP and SDP if different from the bind IP. Default: `source` IP address</dd>
|
245
254
|
</dl>
|
246
255
|
|
247
256
|
### Additional SIPp Scenario Attributes
|
data/Rakefile
CHANGED
data/lib/sippy_cup/runner.rb
CHANGED
@@ -99,12 +99,14 @@ module SippyCup
|
|
99
99
|
options = {
|
100
100
|
p: @scenario_options[:source_port] || '8836',
|
101
101
|
sf: @input_files[:scenario].path,
|
102
|
-
l: @scenario_options[:concurrent_max] || @scenario_options[:max_concurrent] || 5,
|
103
|
-
m: @scenario_options[:number_of_calls] || 10,
|
104
|
-
r: @scenario_options[:calls_per_second] || 10,
|
105
|
-
s: @scenario_options[:to_user] || '1'
|
106
102
|
}
|
107
103
|
|
104
|
+
max_concurrent = @scenario_options[:concurrent_max] || @scenario_options[:max_concurrent]
|
105
|
+
options[:l] = max_concurrent if max_concurrent
|
106
|
+
options[:m] = @scenario_options[:number_of_calls] if @scenario_options[:number_of_calls]
|
107
|
+
options[:r] = @scenario_options[:calls_per_second] if @scenario_options[:calls_per_second]
|
108
|
+
options[:s] = @scenario_options[:to_user] if @scenario_options[:to_user]
|
109
|
+
|
108
110
|
options[:i] = @scenario_options[:source] if @scenario_options[:source]
|
109
111
|
options[:mp] = @scenario_options[:media_port] if @scenario_options[:media_port]
|
110
112
|
|
@@ -112,6 +114,7 @@ module SippyCup
|
|
112
114
|
options[:no_rate_quit] = nil
|
113
115
|
options[:rate_max] = @scenario_options[:calls_per_second_max]
|
114
116
|
options[:rate_increase] = @scenario_options[:calls_per_second_incr] || 1
|
117
|
+
options[:rate_interval] = @scenario_options[:calls_per_second_interval] if @scenario_options[:calls_per_second_interval]
|
115
118
|
end
|
116
119
|
|
117
120
|
if @scenario_options[:stats_file]
|
data/lib/sippy_cup/version.rb
CHANGED
@@ -20,9 +20,6 @@ describe SippyCup::Runner do
|
|
20
20
|
name: foobar
|
21
21
|
source: 'dah.com'
|
22
22
|
destination: 'bar.com'
|
23
|
-
concurrent_max: 5
|
24
|
-
calls_per_second: 2
|
25
|
-
number_of_calls: 10
|
26
23
|
steps:
|
27
24
|
- invite
|
28
25
|
- wait_for_answer
|
@@ -48,7 +45,7 @@ steps:
|
|
48
45
|
describe '#run' do
|
49
46
|
it "executes the correct command to invoke SIPp" do
|
50
47
|
full_scenario_path = File.join(Dir.tmpdir, '/scenario.*')
|
51
|
-
expect_command_execution %r{sudo \$\(which sipp\) -p 8836 -sf #{full_scenario_path} -
|
48
|
+
expect_command_execution %r{sudo \$\(which sipp\) -p 8836 -sf #{full_scenario_path} -i dah.com bar.com}
|
52
49
|
subject.run
|
53
50
|
end
|
54
51
|
|
@@ -83,6 +80,34 @@ steps:
|
|
83
80
|
end
|
84
81
|
end
|
85
82
|
|
83
|
+
context "specifying outbound options in the manifest" do
|
84
|
+
let(:manifest) do
|
85
|
+
<<-MANIFEST
|
86
|
+
name: foobar
|
87
|
+
source: 'dah.com'
|
88
|
+
destination: 'bar.com'
|
89
|
+
to_user: 1
|
90
|
+
concurrent_max: 5
|
91
|
+
calls_per_second: 2
|
92
|
+
number_of_calls: 10
|
93
|
+
steps:
|
94
|
+
- invite
|
95
|
+
- wait_for_answer
|
96
|
+
- ack_answer
|
97
|
+
- sleep 3
|
98
|
+
- send_digits 'abc'
|
99
|
+
- sleep 5
|
100
|
+
- send_digits '#'
|
101
|
+
- wait_for_hangup
|
102
|
+
MANIFEST
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'should pass the appropriate options to sipp' do
|
106
|
+
expect_command_execution(/-l 5 -m 10 -r 2 -s 1/)
|
107
|
+
subject.run
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
86
111
|
context "specifying arbitrary options in the manifest" do
|
87
112
|
let(:manifest) do
|
88
113
|
<<-MANIFEST
|
@@ -335,6 +360,7 @@ concurrent_max: 5
|
|
335
360
|
calls_per_second: 2
|
336
361
|
calls_per_second_max: 5
|
337
362
|
calls_per_second_incr: 2
|
363
|
+
calls_per_second_interval: 20
|
338
364
|
number_of_calls: 10
|
339
365
|
errors_report_file: errors.txt
|
340
366
|
steps:
|
@@ -350,7 +376,7 @@ steps:
|
|
350
376
|
end
|
351
377
|
|
352
378
|
it 'should not terminate the test when reaching the rate limit and set the rate limit and increase appropriately' do
|
353
|
-
expect_command_execution(/-no_rate_quit -rate_max 5 -rate_increase 2/)
|
379
|
+
expect_command_execution(/-no_rate_quit -rate_max 5 -rate_increase 2 -rate_interval 20/)
|
354
380
|
subject.run
|
355
381
|
end
|
356
382
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sippy_cup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Klang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: packetfu
|