https://github.com/tronprotocol/lever
stress testing for java-tron
https://github.com/tronprotocol/lever
Last synced: about 1 year ago
JSON representation
stress testing for java-tron
- Host: GitHub
- URL: https://github.com/tronprotocol/lever
- Owner: tronprotocol
- Created: 2018-04-09T04:00:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T04:13:08.000Z (over 7 years ago)
- Last Synced: 2025-04-16T08:10:44.668Z (about 1 year ago)
- Language: Java
- Size: 1.69 MB
- Stars: 8
- Watchers: 8
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

> Stress testing for java-tron's gRPC
## lever
lever is a stress testing tool for [java-tron].
[java-tron]:https://github.com/tronprotocol/java-tron
## How to use?
### Run a private blockchain of java-tron
Read the [Start Private Blockchain]. Two accounts need to be reserved, one for initiating the transfer and one for receiving the transfer amount.
[Start Private Blockchain]:http://wiki.tron.network/en/latest/start_private_blockchain.html
### Jmeter
1. Install Jmeter.
### lever
1. Generate jar and run test:
```shell
$ git clone https://github.com/tronprotocol/lever.git
$ cd lever
$ ./gradlew build
$ ./gradlew clean shadowJar -PmainClass=org.tron.program.RpcHunterSendCoin
$ cp build/libs/org.tron.program.RpcHunterSendCoin.jar jmeter/lib/ext/org.tron.program.RpcHunterSendCoin.jar
$ cp src/main/resources/jmeter-setting.jmx jmeter/bin/
$ cd jmeter/bin
$ ./jmeter -n -t /jmeter-setting.jmx -l test_result.jtl -e -o /resultReport
```
2. Configuration
2.1 config.conf
`lever/src/main/resources/config.conf`:
```shell
grpc.address = "127.0.0.1:50051" # target gRPC server address
```
2.2 jmeter-setting.jmx
`lever/src/main/resources/jmeter-setting.jmx`:
10 threads running for 1800 seconds:
```xml
continue
false
-1
10
1
true
1800
```
Transaction arguments(put your arguments: `Argument.value` to this file):
```xml
toAddress
27d3byPxZXKQWfXX7sJvemJJuv5M65F3vjS
=
amount
1
=
privateKey
effa55b420a2fe39e3f73d14b8c46824fd0d5ee210840b9c27b2e2f42a09f1f9
=
org.tron.program.RpcHunterSendCoin
```
Throughout setting(60/s):
```xml
throughput
60.0
0.0
1
```
You can use [generate-account-tool](https://github.com/sasaxie/generate-account-tool) to generate your account and put it to java-tron's config.conf: `genesis.block.assets`, `genesis.block.witnesses`, `localwitness`