https://github.com/nervosnetwork/ckb-benchmark-tool
Benchmark CKB network TPS
https://github.com/nervosnetwork/ckb-benchmark-tool
Last synced: about 1 year ago
JSON representation
Benchmark CKB network TPS
- Host: GitHub
- URL: https://github.com/nervosnetwork/ckb-benchmark-tool
- Owner: nervosnetwork
- Created: 2019-04-25T13:17:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-01T04:30:36.000Z (about 7 years ago)
- Last Synced: 2025-05-18T11:07:14.766Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 136 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Benchmark CKB network TPS
=======
## Setup
```
git clone https://github.com/nervosnetwork/ckb-benchmark-tool.git
cd ckb-benchmark-tool && bundle install
```
## Usage
1, Start a local CKB node.
2, Send transactions
```
# update config.toml
./bench.rb run config.toml
```
1. find cellbases from `block_number`, then prepare a bench of cells
2. send `txs_count` transactions to node, then wait for committed.
3, Run statistics
```
./bench.rb stat
```
Example:
> testnet is still at early stage, the benchmark result may change frequently
```
statistics...
Total: 2000
Total TPS: 57
+------------------+---------------------------+---------------------------+---------------------------+---------------------------+-----+
| type | avg | median | fastest 20% | slowest 20% | tps |
+------------------+---------------------------+---------------------------+---------------------------+---------------------------+-----+
| Proposed at | 2019-04-27 00:10:53 +0800 | 2019-04-27 00:10:53 +0800 | 2019-04-27 00:10:53 +0800 | 2019-04-27 00:10:53 +0800 | 153 |
| Committed at | 2019-04-27 00:11:15 +0800 | 2019-04-27 00:11:15 +0800 | 2019-04-27 00:11:15 +0800 | 2019-04-27 00:11:15 +0800 | 57 |
| Per tx proposed | 13.0 | 13 | 13.0 | 13.0 | 153 |
| Per tx committed | 35.0 | 35 | 35.0 | 35.0 | 57 |
+------------------+---------------------------+---------------------------+---------------------------+---------------------------+-----+
```
## TODO
- [ ] Wait confirmation blocks
- [ ] Allow txs timeout