Skip to content

Instantly share code, notes, and snippets.

@RaulGracia
Created February 2, 2021 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RaulGracia/1f9cf3698b009abc55771f4ac25c0d0d to your computer and use it in GitHub Desktop.
Save RaulGracia/1f9cf3698b009abc55771f4ac25c0d0d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from __future__ import print_function
import json
import sys
def add_test():
driver = {
'name': 'Pravega',
'driverClass': 'io.openmessaging.benchmark.driver.pravega.PravegaBenchmarkDriver',
'client': {
'controllerURI': 'tcp://localhost:9090',
'scopeName': 'examples',
},
'writer': {
'enableConnectionPooling': True,
'enableTransaction': False,
'eventPerTransaction': 1,
},
'enableTransaction': False,
'includeTimestampInEvent': includeTimestampInEvent,
}
workload = {
'messageSize': messageSize,
'topics': topics,
'partitionsPerTopic': partitionsPerTopic,
'subscriptionsPerTopic': subscriptionsPerTopic,
'consumerPerSubscription': consumerPerSubscription,
'producersPerTopic': producersPerTopic,
'producerRate': producerRateEventsPerSec,
'consumerBacklogSizeGB': consumerBacklogSizeGB,
'testDurationMinutes': testDurationMinutes,
'keyDistributor': 'RANDOM_NANO',
}
t = dict(
test='openmessaging-benchmark',
max_test_attempts=1,
driver=driver,
workload=workload,
numWorkers=numWorkers,
localWorker=localWorker,
tarball=tarball,
build=build,
undeploy=True,
)
test_list.append(t)
test_list = []
localWorker = False
tarball = 'package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz'
build = False
numWorkers=10
# Message size 1KB
for repeat in range(1):
for testDurationMinutes in [4]:
for messageSize in [1024]:
for producerRateEventsPerSec in [25e4]:
for topics in [1]:
for partitionsPerTopic in [1, 10, 100, 500, 1000, 5000]:
for producersPerTopic in [1, 10, 50, 100]:
if producersPerTopic == 1:
numWorkers = 2
else: numWorkers=10
for consumerBacklogSizeGB in [0]:
for subscriptionsPerTopic in [1]:
for consumerPerSubscription in [producersPerTopic]:
for includeTimestampInEvent in [True]:
add_test()
print(json.dumps(test_list, sort_keys=True, indent=4, ensure_ascii=False))
print('Number of tests generated: %d' % len(test_list), file=sys.stderr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment