Adds Zaqar consumer-producer scenario
This scenario for Zaqar benchmarks a serial consumer-producer use case: creates a queue, sends messages to it, retrieves messages from it and deletes the queue. Some changes have been added to the fakes to test this scenario properly. Change-Id: I49d5956bbf571840829b3e9b1411a907748cf1ed
This commit is contained in:
parent
8f91157e67
commit
7f5e422dbd
@ -10,3 +10,17 @@
|
|||||||
sla:
|
sla:
|
||||||
failure_rate:
|
failure_rate:
|
||||||
max: 0
|
max: 0
|
||||||
|
|
||||||
|
ZaqarBasic.producer_consumer:
|
||||||
|
-
|
||||||
|
args:
|
||||||
|
name_length: 10
|
||||||
|
min_msg_count: 50
|
||||||
|
max_msg_count: 200
|
||||||
|
runner:
|
||||||
|
type: "constant"
|
||||||
|
times: 100
|
||||||
|
concurrency: 10
|
||||||
|
sla:
|
||||||
|
failure_rate:
|
||||||
|
max: 0
|
||||||
|
@ -248,10 +248,13 @@ class FakeQueue(FakeResource):
|
|||||||
self.queue_name = name
|
self.queue_name = name
|
||||||
self.messages = FakeMessagesManager(name)
|
self.messages = FakeMessagesManager(name)
|
||||||
|
|
||||||
def post_message(self, messages):
|
def post(self, messages):
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
self.messages.create(**msg)
|
self.messages.create(**msg)
|
||||||
|
|
||||||
|
def messages(self):
|
||||||
|
return self.messages.list()
|
||||||
|
|
||||||
|
|
||||||
class FakeDbInstance(FakeResource):
|
class FakeDbInstance(FakeResource):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user