Benchmarking

To test the performance of Eclipse Testnet, you can run our benchmarking script. The following test benchmarks AMM swaps to assess the TPS of Eclipse Testnet.

Prerequisitesarrow-up-right

Once you have the above installed, clone the benchmarking repository:

git clone https://github.com/Eclipse-Laboratories-Inc/eclipse-benchmarking/

Running Benchmarking Testarrow-up-right

Navigate to the token_swap folder after cloning the repository. Install ts-node by running the following command:

npm i -g ts-node
circle-exclamation

To install the dependencies, run the following command:

npm i

Make sure to run this command inside the token_swap folder. The final step is to run the benchmarking tests using the following command:

ts-node spam.ts

This runs 10 instances of an AMM performing any specified number of swaps.

Modifying Benchmarkingarrow-up-right

The default test is 275 swaps. To modify the number of swaps, modify line 63 in the benchmark.ts file inside the token_swap folder. The following is the code snippet to modify:

If you've followed the steps successfully, you should see an output similar to the following:

Was this helpful?