Refer to the Configuration for configuration options.
- Simulator subproject qualifier:
:simulator
- Assuming your working directory is the repo root
NOTE: one may use the
-p
flag for./gradlew
in order to avoid specifying the target subproject repeatedly on each task when running multiple tasks. When running only a single task, however, it is recommended to use the project qualifier (i.e.:simulator:
) for both simplicity and clarity.
NOTE: if you have not done so already, it is generally recommended to build the entire repo first:
./gradlew clean build -x test
-
To quickly build the Simulator sources (without running tests), do the following:
./gradlew -p simulator clean build -x test
Usually, you would want to run the Server first, refer to the Quickstart of the Server for a quick guide on how to get started with the application.
-
To start the Simulator, do the following:
./gradlew :simulator:run
-
To start the Simulator with debug enabled, do the following:
./gradlew :simulator:run --debug-jvm
-
Attach your remote jvm debugger to port 5005.
The simulator can run in two modes (Publisher and Consumer) and provides metrics for both configurations. To view the metrics:
-
Start the Block Node server and simulator first:
./gradlew startDockerContainer
-
Access the metrics:
- Open Grafana at http://localhost:3000
- Navigate to Dashboards
- You'll find two dashboards:
- Block Stream Simulator Publisher: Shows metrics for the publisher instance
- Block Stream Simulator Consumer: Shows metrics for the consumer instance