Skip to content

Latest commit

 

History

History
96 lines (75 loc) · 2.57 KB

GettingStarted.md

File metadata and controls

96 lines (75 loc) · 2.57 KB

FireFly-Perf-CLI Quick Start

File Structure Setup

  • Create a folder structure as below:

    ~/ffperf-testing/
    ├
    ├── firefly
    │   ├── <Firefly Files>
    ├
    ├── firefly-perf-cli
    │   ├── <Firefly Perf CLI Files>
    ├
    ├── prep.sh
    ├── getLogs.sh
  • Helper commands to make folder structure from above:

    # From the firefly-perf-cli folder
    mkdir ~/ffperf-testing
    git clone [email protected]:hyperledger/firefly.git ~/ffperf-testing/firefly
    git clone [email protected]:hyperledger/firefly-perf-cli.git ~/ffperf-testing/firefly-perf-cli
    cp scripts/getLogs.sh ~/ffperf-testing/getLogs.sh
    cp scripts/prep.sh ~/ffperf-testing/prep.sh

Preparing Environment

Checkout firefly branch you want to test

cd ~/ffperf-testing/firefly
git checkout ...

Checkout ff-perf-cli branch you want to use for test

cd ~/ffperf-testing/firefly-perf-cli
git checkout ...

Preparing Test

Run script to setup test

  • ./prep.sh is a script that does the following:

    1. Kills existing perf test
    2. Builds local FireFly image
    3. Installs local FireFly Perf CLI
    4. Removes old FireFly stack
    5. Creates new FireFly stack
    6. Allows you to edit docker-compose.yml
    7. Starts FireFly stack
    8. Outputs command to kick off test
  • Run:

    cd ~/ffperf-testing
    ./prep.sh <old_stack_name> <new_stack_name> <blockchain_type>
    # ex: ./prep.sh oldStack newStack geth
  • Once script is done, you'll be given a command to run the perf test. Paste that in to the terminal to start the test.

  • **Please save the markdown row that is printed. You will need to use this to create an issue in hyperledger/firefly#519

Getting Logs

  • ./getLogs.sh is a script that does the following:

    1. Finds location of firefly_core, ethconnect, and ffperf logs
    2. Stores the compressed logs in a timestamped directory in ~/ff-perf-testing
    3. ~/ffperf-testing/
      ├── /ff_logs_03_03_2022_01_18_PM/
      │   ├── ffperf.log
      │   ├── log_ethconnect_0.log.gz
      │   └── log_firefly_core_0.log.gz
  • Run:

    cd ~/ffperf-testing
    ./getLogs.sh <stack_name>
    # ex: ./getLogs.sh test

Viewing Grafana

  • In Grafana, add a Prometheus Data Source that points to your firefly node's address on port 9090 (ex. localhost:9090)
  • Import grafanaDashboard.json in Grafana
  • If you don't have Grafana on your machine, you can use the docs found here