[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:
parent
a47ff0da96
commit
02435f13f7
@ -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]}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user