[Rally profile] Performance of creating atomic timers

This patch adds scenario that calculates creation of
specified number of atomic timers.

Change-Id: I68ba4e7d09fae29f3edb4630d04ad6b981ecbed1
This commit is contained in:
Anton Studenov 2016-10-28 20:01:30 +03:00
parent e9dfaa5035
commit dd9c973b89
2 changed files with 52 additions and 0 deletions

View File

@ -30,3 +30,23 @@ class GenerateNamesInAtomic(scenario.Scenario, utils.RandomNameGeneratorMixin):
with atomic.ActionTimer(self, "generate_%s_names" % number_of_names):
for i in range(number_of_names):
self.generate_random_name()
@scenario.configure(name="RallyProfile.calculate_atomic")
class CalculateAtomic(scenario.Scenario, utils.RandomNameGeneratorMixin):
def run(self, number_of_atomics):
"""Calculate atomic actions.
:param number_of_atomics: int number of atomics to run
"""
tmp_name = "tmp_actions"
calc_atomic_name = "calculate_%s_atomics" % number_of_atomics
with atomic.ActionTimer(self, calc_atomic_name):
for _ in range(number_of_atomics):
with atomic.ActionTimer(self, tmp_name):
pass
self._atomic_actions = {
calc_atomic_name: self._atomic_actions[calc_atomic_name]}

View File

@ -818,6 +818,8 @@
times: 1000
concurrency: 10
sla:
max_avg_duration_per_atomic:
generate_100_names: 0.006
failure_rate:
max: 0
-
@ -828,6 +830,8 @@
times: 500
concurrency: 10
sla:
max_avg_duration_per_atomic:
generate_1000_names: 0.046
failure_rate:
max: 0
-
@ -838,6 +842,34 @@
times: 200
concurrency: 10
sla:
max_avg_duration_per_atomic:
generate_10000_names: 0.415
failure_rate:
max: 0
RallyProfile.calculate_atomic:
-
args:
number_of_atomics: 100
runner:
type: "constant"
times: 300
concurrency: 10
sla:
max_avg_duration_per_atomic:
calculate_100_atomics: 0.025
failure_rate:
max: 0
-
args:
number_of_atomics: 500
runner:
type: "constant"
times: 100
concurrency: 10
sla:
max_avg_duration_per_atomic:
calculate_500_atomics: 0.46
failure_rate:
max: 0