An open API service indexing awesome lists of open source software.

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

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`