Add Steve watch stress test with SQLite caching#148
Conversation
Co-authored-by: moio <[email protected]>
7963354 to
bade267
Compare
moio
left a comment
There was a problem hiding this comment.
@copilot instead of proposing a shell script to check the WAL size, is it possible to implement in the k6 script an equivalent of kubectl exec, given k6 has full Kubernetes API access to the cluster running Rancher?
If that is possible, add such code to k6/generic/k8s.js so that it stays usable.
When you are done, look at k6/tests/steve_watch_stress_test.js and remove any redundant, stale, cruft code/variables and avoid overcommenting.
Implemented k8s.exec() in k6/generic/k8s.js using WebSocket with SPDY protocol (v4.channel.k8s.io subprotocol). The function handles command execution in pods via the Kubernetes API. WAL size checking is now integrated in the test via checkWALSizeScenario() - runs every 10 seconds and reports sqlite_wal_size_bytes metric with 10MB threshold. Cleaned up steve_watch_stress_test.js by removing excessive comments, simplifying scenario implementations, and making code more concise. |
- Created k6/tests/steve_watch_stress_test.js with parallel scenarios - Implements watchers, create/delete events, CRD updates, and light reads - Added check_wal_size.sh monitoring script for external WAL size validation - Added comprehensive documentation in STEVE_WATCH_STRESS_TEST.md - Test parametrized with COUNT defaulting to 2000 concurrent watchers - All resource operations via Kubernetes API, watches via Steve Co-authored-by: moio <[email protected]>
a6a2d63 to
7059632
Compare
Implements a k6 stress test for Steve's watch functionality with SQLite caching enabled, converting the stress test gist into a parametrized, parallel k6 test.
Test Architecture
Five parallel scenarios:
COUNT) subscribing to configmaps, secrets, and CRDs. Connections persist for full test duration (default 10 min) with ±5% jitter.Success Criteria
Implementation
k6/generic/k8s.js
exec()function implementing Kubernetes exec API via WebSocketk6/tests/steve_watch_stress_test.js (380 lines)
checkWALSizeScenario()using k8s.exec()k6/tests/STEVE_WATCH_STRESS_TEST.md
Example Usage
The test automatically monitors SQLite WAL file size and reports it as the
sqlite_wal_size_bytesmetric.Also Included
Cherry-picked commits from #145: Makefile verification targets and AGENTS.md.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.