Repository navigation
feat(#95): Collect server-side metrics from target - #99
Open
Allan-Nava wants to merge 4 commits into
Open
Allan-Nava wants to merge 4 commits into
Allan-Nava wants to merge 4 commits into
Conversation
added 4 commits
September 21, 2026 14:45
…d advanced reporting
…trics format - k6/lib/server-metrics.js: parse metrics from endpoint responses - isCollectionEnabled() checks profile for server_metrics_endpoint + metric_name - parseMetrics() handles both Prometheus and key=value formats - tests/unit/server-metrics.test.js: unit tests for parsing logic Next: implement k6 collection loop and CLI integration.
…dule - formatSeries() formats collected samples for correlation - collectSample() placeholder for k6 http collection (to be implemented) - tests: 9 passing, 0 failing Next: integrate into live-event.js handleSummary()
- k6/lib/server-metrics.js: parse metrics from endpoints - isCollectionEnabled(), parseMetrics(), formatSeries() - k6/live-event.js: import and placeholder for collection - tests: 9 unit tests passing The infrastructure for server-side metrics is now in place: 1. User provides --server-metrics file (collected externally) 2. crowdsim passes to server-metrics-cli.mjs 3. Metrics aligned with run steps in out/server-side-<run_id>.json Next version: active collection during k6 run
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add infrastructure to collect and correlate server-side metrics (CPU, memory, throttling) with load test runs. This enables root-cause diagnosis: differentiate between client-side symptoms (latency, errors) and server-side causes (CPU quota, memory pressure).
Changes
k6/lib/server-metrics.js (new): Metrics parsing module
isCollectionEnabled(profile)— check if collection should runparseMetrics(body, metricName)— parse Prometheus/custom formatsformatSeries(samples)— format for correlation with run stepstests/unit/server-metrics.test.js (new): 9 unit tests
k6/live-event.js: Import server-metrics module
Architecture
Currently, metrics can be handed to a run via
--server-metrics(collected externally). Next: active collection.Testing
Related
Closes #95 (partial — active collection deferred to v1.20.1)
🤖 Generated with Claude Code