Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28c494f

Browse files
bklangbenlangfeld
authored andcommitted
Support for setting rate scaling independently of reporting frequency
Via the new `calls_per_second_interval` option. See also SIPp/sipp#107 and SIPp/sipp#126.
1 parent f7ed86b commit 28c494f

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# develop
2+
* 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.
23

34
# [0.5.0](https://github.com/mojolingo/sippy_cup/compare/v0.4.1...v0.5.0)
45
SYNTAX CHANGES!

README.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ Each parameter has an impact on the test, and may either be changed once the XML
235235
<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`). Default: 10</dt>
236236

237237
<dt>calls_per_second_incr</dt>
238-
<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 `stats_interval`. Default: 1.</dd>
238+
<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>
239+
240+
<dt>calls_per_second_interval</dt>
241+
<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>
239242

240243
<dt>calls_per_second_max</dt>
241244
<dd>The maximum rate of calls-per-second. If unset, the CPS rate will remain at the level set by `calls_per_second`.</dd>

lib/sippy_cup/runner.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def command_options
112112
options[:no_rate_quit] = nil
113113
options[:rate_max] = @scenario_options[:calls_per_second_max]
114114
options[:rate_increase] = @scenario_options[:calls_per_second_incr] || 1
115+
options[:rate_interval] = @scenario_options[:calls_per_second_interval] if @scenario_options[:calls_per_second_interval]
115116
end
116117

117118
if @scenario_options[:stats_file]

spec/sippy_cup/runner_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ def expect_command_execution(command = anything)
335335
calls_per_second: 2
336336
calls_per_second_max: 5
337337
calls_per_second_incr: 2
338+
calls_per_second_interval: 20
338339
number_of_calls: 10
339340
errors_report_file: errors.txt
340341
steps:
@@ -350,7 +351,7 @@ def expect_command_execution(command = anything)
350351
end
351352

352353
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/)
354+
expect_command_execution(/-no_rate_quit -rate_max 5 -rate_increase 2 -rate_interval 20/)
354355
subject.run
355356
end
356357
end

0 commit comments

Comments
 (0)