-
-
Save RaulGracia/4f9bf9077faf1b388092b60b3cacf0dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/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': 'examples2', | |
}, | |
'writer': { | |
'enableConnectionPooling': False, | |
'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 | |
# Message size 10 KB | |
for repeat in range(0): | |
for producerWorkers in [1]: | |
numWorkers = 0 if localWorker else producerWorkers*2 | |
for testDurationMinutes in [4]: | |
for messageSize in [10000]: | |
for producerRateEventsPerSec in [10e3]: | |
for topics in [1]: | |
for partitionsPerTopic in [16]: | |
for producersPerWorker in [1]: | |
producersPerTopic = int(producersPerWorker * producerWorkers) | |
for consumerBacklogSizeGB in [100]: | |
for subscriptionsPerTopic in [1]: | |
for consumerPerSubscription in [partitionsPerTopic]: | |
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