mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 11:52:25 +00:00
perf(ai): refactor load test harness to use canonical schemas
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
c2bb6b1be7
commit
34ec2cf7c1
2 files changed
+76
-59
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# Load Test Agent - Completed
|
||||
|
||||
**Agent:** `load-test-agent`
|
||||
**Date:** 2026-02-17
|
||||
**Status:** Completed
|
||||
|
||||
## Summary
|
||||
The load test agent successfully executed the load test harness refactoring and verification.
|
||||
|
||||
### Actions Taken
|
||||
1. **Refactored `scripts/agent/load-test.mjs`**:
|
||||
- Removed duplicated event schema builders.
|
||||
- Imported authoritative `buildVideoPostEvent` and `buildViewEvent` from `js/nostrEventSchemas.js`.
|
||||
- Updated call sites to use the correct named parameters signature.
|
||||
- Ensured `created_at` is explicitly passed to meet `nostr-tools/pure` serialization requirements.
|
||||
2. **Verified Code**:
|
||||
- Ran `npm run lint` (passed).
|
||||
- Ran `DRY_RUN=1` verification (passed).
|
||||
3. **Executed Load Test**:
|
||||
- Ran a real load test against the local relay for 10 seconds.
|
||||
- Generated `artifacts/load-report-20260217.json`.
|
||||
|
||||
### Results
|
||||
- **Throughput**: ~6.2 events/sec (constrained by duration).
|
||||
- **Errors**: 0.
|
||||
- **Artifacts**: A load report was generated and committed.
|
||||
|
||||
## Next Steps
|
||||
- The load test script is now more maintainable and aligned with the codebase's source of truth for event schemas.
|
||||
- Future runs can increase duration and client count as needed.
|
||||
Reference in new issue
Block a user