mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Merge branch 'test-template' of github.com:BigchainDB/bigchaindb into test-template
This commit is contained in:
commit
4dffeb2f55
@ -14,7 +14,8 @@ def create_write_transaction(tx_left):
|
||||
b = Bigchain()
|
||||
while tx_left > 0:
|
||||
# use uuid to prevent duplicate transactions (transactions with the same hash)
|
||||
tx = b.create_transaction(b.me, b.me, None, 'CREATE', payload={'msg': str(uuid.uuid4())})
|
||||
tx = b.create_transaction(b.me, b.me, None, 'CREATE',
|
||||
payload={'msg': str(uuid.uuid4())})
|
||||
tx_signed = b.sign_transaction(tx, b.me_private)
|
||||
b.write_transaction(tx_signed)
|
||||
tx_left -= 1
|
||||
@ -26,7 +27,7 @@ def run_add_backlog(args):
|
||||
workers.start()
|
||||
|
||||
|
||||
def run_update_statsd(args):
|
||||
def run_set_statsd_host(args):
|
||||
with open(expanduser('~') + '/.bigchaindb', 'r') as f:
|
||||
conf = json.load(f)
|
||||
|
||||
@ -45,9 +46,9 @@ def main():
|
||||
backlog_parser.add_argument('num_transactions', metavar='num_transactions', type=int, default=0,
|
||||
help='Number of transactions to add to the backlog')
|
||||
|
||||
# update statsd configuration
|
||||
statsd_parser = subparsers.add_parser('update-statsd',
|
||||
help='Update statsd host')
|
||||
# set statsd host
|
||||
statsd_parser = subparsers.add_parser('set-statsd-host',
|
||||
help='Set statsd host')
|
||||
statsd_parser.add_argument('statsd_host', metavar='statsd_host', default='localhost',
|
||||
help='Hostname of the statsd server')
|
||||
|
||||
|
6
benchmarking-tests/fabfile.py
vendored
6
benchmarking-tests/fabfile.py
vendored
@ -23,14 +23,14 @@ env.key_filename = 'pem/bigchaindb.pem'
|
||||
|
||||
@task
|
||||
@parallel
|
||||
def prepare_test():
|
||||
def put_benchmark_utils():
|
||||
put('benchmark_utils.py')
|
||||
|
||||
|
||||
@task
|
||||
@parallel
|
||||
def update_statsd_conf(statsd_host='localhost'):
|
||||
run('python3 benchmark_utils.py update-statsd {}'.format(statsd_host))
|
||||
def set_statsd_host(statsd_host='localhost'):
|
||||
run('python3 benchmark_utils.py set-statsd-host {}'.format(statsd_host))
|
||||
print('update configuration')
|
||||
run('bigchaindb show-config')
|
||||
|
||||
|
@ -6,7 +6,8 @@ Measure how many blocks per second are created on the _bigchain_ with a pre fill
|
||||
2. Copy `deploy-cluster-aws/hostlist.py` to `benchmarking-tests`
|
||||
|
||||
```bash
|
||||
fab prepare_test
|
||||
fab update_statsd_conf:<hostname of the statsd server>
|
||||
fab put_benchmark_utils
|
||||
fab set_statsd_host:<hostname of the statsd server>
|
||||
fab prepare_backlog:<num txs per node> # wait for process to finish
|
||||
fab start_bigchaindb
|
||||
fab start_bigchaindb
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user