Skip to main content

Stress-Test Robot

src/robot/ is a Go simulated client and stress-test tool built on robot-go.

Quick Start​

  1. Select the robot target in the configured C++ project:
cmake --build <BUILD_DIR> --config Debug --target robot-build

robot is excluded from the default ALL build; this target uses go-task to generate Go protocols/RPC handlers and build the client. 2. Generate configuration and start the required services. The binary is <BUILD_DIR>/publish/robot/bin/robot (robot.exe on Windows). 3. Read robot --help and commands under src/robot/cmd/, then start with one login and business request. Matching scenarios are under src/robot/case_config/; friend commands use cmd/friend.go. 4. Verify responses before increasing concurrency/duration, and inspect service logs and telemetry.

Customization and Design​

Structure​

src/robot/
├── main.go
├── cmd/ # CLI commands
├── rpc/ # Business RPC wrappers
├── task/ # Stress-test tasks
├── case_config/ # Scenario configuration
├── Taskfile.yml # go-task build entry point
└── atframework/ # Go dependencies and protocol SDKs

Protocol Generation​

robot uses atgateway v2 for handshakes, encryption, compression, and reconnection. Go protobuf and RPC handlers are generated by the existing Taskfile.yml, generate-for-pb.yaml, and template/robot_rpc_handle.go.mako workflow. Rebuild robot after adding CS RPCs, then add commands/tasks as needed.

Deployment and Telemetry​

install/cloud-native/charts/robot/ provides configuration/deployment resources. Values configure targets and workload parameters. OpenTelemetry uses modules/telemetry.yaml and the robot chart's existing configuration.