daml/ledger-service/http-json-perf
Leonid Shlyapnikov ba22f5b9a4
AsyncQueryConstantAcs scenario (#7054)
changelog_begin
changelog_end
2020-08-07 09:33:05 -04:00
..
release JSON API command submission perf test (#6906) 2020-08-04 18:51:44 +00:00
src/main/scala/com/daml/http/perf AsyncQueryConstantAcs scenario (#7054) 2020-08-07 09:33:05 -04:00
BUILD.bazel JSON API command submission perf test (#6906) 2020-08-04 18:51:44 +00:00
README.md JSON API command submission perf test (#6906) 2020-08-04 18:51:44 +00:00

Instructions

The following instructions tested on Linux but should also work on macOs.

1. Install Gatling (open-source load testing solution)

2. Create quickstart DAML project

$ daml new quickstart-java quickstart-java
$ cd quickstart-java/
$ daml build

3. Start Sandbox with quickstart DAR

Ledger ID MyLedger is important, it is currently hardcoded in the com.daml.http.perf.scenario.SimulationConfig. See aliceJwt.

$ daml sandbox --ledgerid MyLedger ./.daml/dist/quickstart-0.0.1.dar

4. Start JSON API

daml json-api  --ledger-host=localhost --ledger-port=6865 --http-port=7575 --package-reload-interval 5h --allow-insecure-tokens

5. Run Gatling scenario

$ <GATLING_HOME>/bin/gatling.sh --simulations-folder=<DAML_PROJECT_HOME>/ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/scenario --simulation=com.daml.http.perf.scenario.CreateCommand

Where:

  • <GATLING_HOME> -- path to the Gatling directory
  • <DAML_PROJECT_HOME> -- path to the DAML Repository on the local disk
  • --simulation=com.daml.http.perf.scenario.CreateCommand -- full class name of the scenario from the --simulations-folder