Lantern
Benchmarking Lantern
Benchmarking Tool
We provide an open-source benchmarking tool to test Lantern's performance. The repository includes a full readme with detailed instructions.
View on GitHubQuick Start
To run a quick test, clone the repository and follow these steps:
1. Build the Tool
go build -o rpc_test
2. Execute the Tests
Replace <your-API-key> with your FluxRPC API key:
./rpc_test runall --api-key <your-API-key> --url http://localhost:8080
Requirements
To run the benchmarking tests, you will need:
- Golang environment installed
- Lantern running locally with a valid API key
- The "benchmark" preset configuration file
This test assumes you are using the "benchmark" preset configuration file. A new account on FluxRPC receives 10GB of free bandwidth, which is sufficient for this test. Just create an API key and pass it to Lantern.
Expected Results
The results should be very fast . If you're seeing values in the tens of milliseconds, that generally means you're making a request that Lantern cannot fully serve from local cache.
Make sure you're using the 'benchmark' configuration pre-set, that Lantern has a valid API key, and that it has started up fully before running the tests.
Typical Performance
- getAccountInfo: 0.1-0.25 milliseconds
- getMultipleAccounts: 0.1-0.25 milliseconds
- Throughput: 10,000+ requests per second
Advanced Usage
The benchmarking tool has many more powerful options when used from the command line. Run it with the -h or --help flags for more information.
Custom benchmarks against very large programs will take longer to finish due to the large gPA requests. gAI and gMA still completed very quickly regardless of the program size.