Load Tester Application

The load tester app is a sample application made to test the Tutorial sample. It’s composed of a Node.js application and a Python script. You can customize this app to test your project.

Node.js Test App

This app is written in TypeScript and provides a Websocket implementation and an emulated window object to the Genvid API for it to run in Node.js.

This application is composed of 3 files.

  • config.ts: Retrieves the configuration and initializes the Genvid API.
  • session.ts: Used to test one connection to the Genvid service. It:
    • creates a Genvid client and connects to system,
    • sends events, and
    • gathers metrics and sends them to statsd.
  • index.ts: Entry point to the system. It queries the web site for join requests and creates sessions at regular intervals.

Python Script

The Python script configures the cluster running the load test. The configurations are in the config/loadtester.hcl file.

The important configurations are:

  • connections: The number of connections.
  • interval: The time interval at which the sessions are created.