Eclipse Documentation
HomeBridge
  • Users
  • Developers
  • Architecture
  • Getting Started
  • Wallet
    • Mainnet Wallets
    • Testnet & Devnet Wallets
      • Adding Eclipse Wallet to dApp
      • Custom Wallets
  • RPC & Block Explorers
    • Dragon's Mouth gRPC Subscriptions
  • Bridges
    • Eclipse Canonical Bridge
    • Hyperlane
  • Oracles
    • Pyth Network
    • Switchboard
  • NFTs
    • Metaplex
    • Nifty Asset
    • Libreplex (Token-2022)
  • Developer Tooling
    • Faucet
    • Benchmarking
      • Running AMM benchmarking tests
    • Decentralized Identities
      • AllDomains
    • OpenBook Quickstart
    • Multisig
  • Eclipse Bug Bounty Program
  • Eclipse Status Page
  • Frequently Asked Questions
  • Differences Between Eclipse and Solana
  • Eclipse Program Registry Guide
  • 📖Tutorials & Guides
    • Developer Guides
      • Quick Start: "Hello World"
        • Deployment Walkthrough
      • Reading from the blockchain
      • Modifying a Solana dApp to Support Eclipse: "Chomping Glass"
        • Developing on the Solana Virtual Machine (SVM)
        • Multi-chain toggle frontend component
      • Dapp Deployment Tutorial - Eclipse Devnet
        • ⚙️Install Dependencies - Windows
          • Step 1: Install Visual Studio Code (VSC)
          • Step 2: Install Rust and Cargo
          • Step 3: Download Visual Studio C++ Build Tools
          • Step 4: Download Node.js
          • Step 5: Install Git on Windows
          • Step 6: Install the Solana CLI
          • Step 7: Install WSL on Visual Studio Code and Upgrade to WSL2
          • Step 8: Set Up Development Environment in Ubuntu WSL
          • Step 9: Install Anchor on Windows and WSL
        • 🏝️Solana CLI & Solana Keypair
          • Step 1: Set Solana CLI to Use Eclipse Devnet
          • Step 2: Verify Solana CLI Configuration
          • Step 3: Generate a New Solana Keypair
          • Step 4: Claim Devnet ETH for Transaction Fees
          • Optional Step: View Balance on Devnet Explorer
        • 🖥️Creating an Anchor Project in Visual Studio Code
          • Step 1: Initialize Anchor Project
          • Step 2: Update the lib.rs File with Smart Contract Code
          • Step 3: Update the Smart Contract's Cargo.toml File
          • Step 4: Update the Project's Root Cargo.toml File
          • Step 5: Compile Your Program with anchor build
          • Step 6: Deploy Your Project to the Eclipse Devnet
          • Step 7: Verify Program Deployment on the Eclipse Devnet Explorer
        • ✨Building a React App Front-End
          • Step 1: Create a New React Project with TypeScript
          • Step 2: Install Solana Web3.js and Wallet Adapter Dependencies
          • Step 3: Install Additional Dependencies for Enhanced Functionality and Compatibility
          • Step 4: Configure Webpack for Browser Compatibility
          • Step 5: Start the Development Server and Verify Setup
          • Step 6: Implement the UI for Your NFT Minter in App.tsx with Updated Code
      • Eclipse Testnet ETH Transfer Transaction Fee Estimator
        • Program Breakdown
        • Program JSX & CSS
        • Program Execution
      • Pyth: How to Use Real-Time Data in Solana Programs
      • Quick Start: User Guide - Testnet
      • cNFTs on Eclipse
        • Create 1 Million NFTs on Eclipse
        • How to Interact with cNFTs
  • 🧠Eclipse Architecture
    • What is Eclipse Mainnet?
      • Settlement - Ethereum
      • Execution - Solana Virtual Machine (SVM)
      • Data Availability - Celestia
      • Proving - RISC Zero
      • Why Eclipse, Why Ethereum, Why Now
    • Lifecycle of an Eclipse Transaction
  • 📚Additional Resources
    • External Documentation
    • Disclosures
Powered by GitBook
On this page
  • Why AMM Benchmarking?​
  • Pre-requisites​
  • Running the benchmarking tests​
  • Modifying the benchmarking tests​
  • Example​

Was this helpful?

  1. Developer Tooling
  2. Benchmarking

Running AMM benchmarking tests

PreviousBenchmarkingNextDecentralized Identities

Was this helpful?

INFO

The following section aims to help us run benchmarking tests on the Eclipse Network.

Why AMM Benchmarking?

  • 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.

Pre-requisites

  • 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:

git clone https://github.com/Eclipse-Laboratories-Inc/eclipse-benchmarking/
  • To do this you will also have to ensure that git is installed. You can install it from .

Running the benchmarking tests

  • 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:

npm i -g ts-node

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:

npm i
  • 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:

ts-node spam.ts
  • 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:

...
   await mintTo(connection, payer, mintA, userAccountA, owner, SWAP_AMOUNT_IN);

    console.log("Run test: benchmark swap");
    await benchmarkSwap(275);

    console.log("Success\n");
  • 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:

Modifying the benchmarking tests

Example

​
​
here
here
​
​
​