github.com/true-sqn/fabric@v2.1.1+incompatible/core/ledger/kvledger/benchmark/README.md (about)

     1  # Ledger Benchmark Tests
     2  
     3  This readme explains the Benchmarks in this package and how to run them.
     4  
     5  - What are the Ledger Benchmark tests
     6  - How to Run the Tests
     7  
     8  ## What are the Ledger Benchmark tests
     9  
    10  The Ledger Benchmark tests provide a way to measure the performance of the Ledger
    11  component with a flexible and controlled workload. These benchmarks short-circuit
    12  chaincode and go directly to the transaction simulator. Also, for block creation,
    13  these benchmarks use a simple in-memory block-cutter.
    14  
    15  These benchmarks first run insert transactions to populate the data and then run the 
    16  read-write transactions on the populated data. The primary purpose of these benchmarks is
    17  to measure the throughput capacity of the ledger component and how it changes for a given
    18  workload.
    19  
    20  ## How to Run The tests
    21  In order to run the benchmarks, run the following command from folder fabric/core/ledger/kvledger/benchmark/scripts
    22  ```
    23  ./runbenchmarks.sh -f <test_parameter_file>.sh
    24  ```
    25  The <test_parameter_file> is expected to contain the parameters for the benchmarks. A sample file (sample_params.sh) is provided.
    26  For running the bechmarks, it is advised to make a copy of the file sample_params.sh and change the parameters that you want to run the tests with. For more details on the parameters and the experiment results, see comments in the file sample_params.sh