Running AMM benchmarking tests
Last updated
Last updated
Essentially, we want to test the performance of the Eclipse Network by obtaining the transactions per second (TPS) that the network can handle and its latency.
You will have to have nodejs installed on your machine. You can install it from .
Now, once you have that ready, you will have to clone our benchmarking repository. You can do that by running the following command:
To do this you will also have to ensure that git is installed. You can install it from .
To run the benchmarking tests, you will first have to navigate to the token_swap
folder after cloning the repository.
First we need to install ts-node. To do this, run the following command:
WARNING
You might have to give super user or admin permissions to install globally or use the -g
flag.
Now we need to install the dependencies. To do this, run the following command:
Make sure to run this command inside the token_swap
folder.
Now, the final step is to run the benchmarking tests using the following command:
This runs 10 instances of an AMM performing any specified number of swaps.
To modify the number of swaps, we will have to modify the benchmark.ts file inside the token_swap
folder.
The following is the code snippet that we will have to modify:
Here we can change the specified number of swaps. The default is 275.
The above code snippet is located at line 63 in the benchmark.ts file.
If all the steps are followed correctly, you should see an output similar to the following: