daml/ledger-service/http-json-perf
Leonid Shlyapnikov cb73542316
http-json-perf cleanup (#7145)
* Removing unused Main and Config,

cleaning up BUILD.bazel: removing common scala options,

* Removing unused dependencies

* Removing unused dependencies

changelog_begin
changelog_end
2020-08-14 17:02:45 +00:00
..
src/main/scala/com/daml/http/perf/scenario http-json-perf cleanup (#7145) 2020-08-14 17:02:45 +00:00
BUILD.bazel http-json-perf cleanup (#7145) 2020-08-14 17:02:45 +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