Skip to content

Conversation

@takaokouji
Copy link

Implementation of MESH v2 load testing scripts as described in issue #68.

Includes:

  • MeshClientSimulator for simulating MESH v2 nodes
  • LoadTestMetrics for performance data collection
  • Scenarios for data update, event notification, and multi-group tests
  • Report generation script

Verified with syntax check and linting.
Co-Authored-By: Gemini noreply@google.com

@takaokouji takaokouji force-pushed the feature/issue-68-mesh-v2-load-test branch 2 times, most recently from bfc910e to 47d45f4 Compare December 31, 2025 12:42
This implementation includes:
- MeshClientSimulator for simulating MESH v2 nodes
- LoadTestMetrics for performance data collection
- Scenarios for data update, event notification, and multi-group tests
- Report generation script
- Isolated dependencies in test/load-test/package.json to avoid conflicts
- Updated README.md with load testing instructions
- Fixed root package-lock.json to resolve CI failure

Co-Authored-By: Gemini <noreply@google.com>
@takaokouji takaokouji force-pushed the feature/issue-68-mesh-v2-load-test branch from 47d45f4 to 0120304 Compare December 31, 2025 12:48
takaokouji and others added 3 commits December 31, 2025 23:24
This commit fixes critical issues in the MESH v2 load testing implementation
and adds convenient npm scripts for running tests.

## Issues Fixed

1. **maxConnectionTimeSeconds validation error**
   - Changed default from 3600 to 600 seconds (server limit)

2. **Group expiration with heartbeat issues**
   - Added automatic renewHeartbeat() call after createGroup()
   - Imported RENEW_HEARTBEAT mutation

3. **Server returning stale/expired groups**
   - Use unique domain names per test run: `test-domain-${Date.now()}`
   - Fixed corrupted state in the `load-test` domain

4. **Subscription null-pointer errors**
   - Added defensive null-checking in subscribeToEvents()

5. **Group lifecycle management**
   - Implemented dissolveGroup() for hosts
   - Implemented leaveGroup() for members
   - Updated disconnect() to call appropriate cleanup methods

## New Features

- Added npm scripts to package.json:
  - `npm run test:data-update` - Data update load test
  - `npm run test:event` - Event notification test
  - `npm run test:multi-group` - Multi-group test
  - `npm run test:all` - Run all tests sequentially
  - `npm run report` - Generate test report

- Created comprehensive test/load-test/README.md with:
  - Setup instructions
  - Usage examples
  - Test descriptions and expected results
  - Performance targets (400 nodes, 3200 TPS)
  - Architecture overview
  - Troubleshooting guide

- Updated main README.md with load testing section
- Updated .gitignore to exclude test/load-test/node_modules

## Test Results

All tests verified working:
- Data Update: 15.65 TPS (959 requests, 0 errors)
- Event Notification: 15.53 TPS (956 requests, 0 errors)
- Multi-Group (2 groups): 30.61 TPS (1911 requests, 0 errors)

Fixes #68

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Simplified the Load Testing (MESH v2) section to only reference
test/load-test/README.md instead of duplicating command examples.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The ws package is only used in test/load-test/lib/mesh-client-simulator.js
and is already included in test/load-test/package.json. It is not needed
in the main package.json.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@takaokouji takaokouji merged commit 7c078c2 into develop Dec 31, 2025
1 check passed
@takaokouji takaokouji deleted the feature/issue-68-mesh-v2-load-test branch December 31, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants