status-go/t/benchmarks/doc_test.go
Pedro Pombeiro 3d00af7fa3
Streamline configuration in status-go. Part of #1180 (#1183)
- Replace command line flags with `-c` config flag. Part of #1180
- Convert node config private keys to hex-encoded string versions.
- Remove `GenerateConfig` from library.
- Remove unused `FirebaseConfig` from library.
- Fix loading of `config/status-chain-genesis.json` in non-dev machines.
2018-09-13 18:31:29 +02:00

52 lines
1.4 KiB
Go

/*
Package benchmarks contains tests that can be used
to run benchmarks and stress tests of our cluster components.
Example usage:
1. Start a Whisper node with mail server capability:
./build/bin/statusd -c mailserver-config.json
where mailserver-config.json contains:
``` json
{
"NetworkId": 4,
"DataDir": "./ethereumtest/rinkeby_rpc",
"KeyStoreDir": "./ethereumtest/keystore",
"MaxPeers": 100,
"LogLevel": "DEBUG",
"WhisperConfig": {
"Enabled": true,
"EnableMailServer": true,
"DataDir": "./ethereumtest/wnode",
"MinimumPoW": 0.002,
"MailServerPassword": "status-offline-inbox"
}
}
```
2. Generate some messages:
go test -v -timeout=30s -run TestSendMessages ./t/benchmarks \
-peerurl=$ENODE_ADDR \
-msgcount=200 \
-msgbatchsize=50
3. Retrieve them from the mail server:
go test -v -timeout=30s -parallel 20 \
-run TestConcurrentMailserverPeers
./t/benchmarks \
-peerurl=$ENODE_ADDR \
-msgcount=200
The result of the last command will tell you how long it took to
retrieve 200 messages with 20 concurrent peers (20 * 200 messages
in total).
The result may be affected due to limitations of the host
on which it was called. It's recommended running mail server
on a different machine and running the third command
from some beefy server.
*/
package benchmarks