Skip to content

Add k6 utilization metrics#623

Open
sagarswamirao wants to merge 5 commits intomainfrom
sagark/k6-utilization-metrics
Open

Add k6 utilization metrics#623
sagarswamirao wants to merge 5 commits intomainfrom
sagark/k6-utilization-metrics

Conversation

@sagarswamirao
Copy link
Collaborator

No description provided.

- Added a CPU monitoring script that tracks resource usage of specific processes during k6 tests, saving data to CSV files.
- Implemented a mechanism to start and stop CPU monitoring, including summary statistics generation for CPU and memory usage.
- Updated k6 test execution to log results in JSON format and provide a summary of test outcomes.
- Ensured that CPU monitoring data is collected and reported even if the tests fail.

This update improves observability and performance analysis during load testing.

Signed-off-by: Sagar Swami Rao Kulkarni <sagarswamirao@gmail.com>
…pt formatting

- Added a trigger for the k6 test workflow on pull requests to the main branch, enhancing testing coverage during development.
- Cleaned up the script by removing unnecessary blank lines, improving readability and maintainability.

This update streamlines the workflow and ensures tests are run on pull requests, contributing to better code quality.

Signed-off-by: Sagar Swami Rao Kulkarni <sagarswamirao@gmail.com>
…updates

- Added a step to collect workflow telemetry using the Catchpoint action, enabling better insights into workflow performance.
- Removed the CPU monitoring script and associated data collection steps to streamline the workflow.
- Updated k6 test configuration to include new parameters for improved test execution.

This update focuses on enhancing observability while simplifying the workflow structure.

Signed-off-by: Sagar Swami Rao Kulkarni <sagarswamirao@gmail.com>
@github-actions
Copy link

Workflow Telemetry - k6 Tests / k6 Tests

Workflow telemetry for commit d77714a09cfae21f2ae0a321746e19197b59d277
You can access workflow job details here

Step Trace

gantt
	title k6 Tests
	dateFormat x
	axisFormat %H:%M:%S
	Set up job : milestone, 1771634411000, 1771634413000
	Collect Workflow Telemetry : 1771634413000, 1771634413000
	Run actions/checkout@v4 : 1771634413000, 1771634414000
	Setup Node.js : 1771634414000, 1771634415000
	Install Bun : 1771634415000, 1771634416000
	Cache Bun dependencies : 1771634416000, 1771634427000
	Build server : 1771634427000, 1771634511000
	Link local package : 1771634511000, 1771634512000
	Install k6-tests dependencies : 1771634512000, 1771634512000
	Generate k6 API clients : 1771634512000, 1771634514000
	Clone malloy-samples : 1771634514000, 1771634516000
	Setup k6 : 1771634516000, 1771634518000
	Setup BigQuery credentials : 1771634518000, 1771634518000
	Start npx server : 1771634518000, 1771634535000
	Run k6 smoke test : 1771634535000, 1771634601000
	Run k6 load test : 1771634601000, 1771634601000
	Extract k6 summary metrics : 1771634601000, 1771634601000
	Upload k6 test summaries : 1771634601000, 1771634602000
	Upload k6 JSON results : 1771634602000, 1771634603000
	Post Cache Bun dependencies : 1771634603000, 1771634617000
	Post Install Bun : 1771634617000, 1771634618000
	Post Setup Node.js : 1771634618000, 1771634618000
	Post Run actions/checkout@v4 : 1771634618000, 1771634618000

Loading

- Removed the telemetry collection step to streamline the workflow.
- Added a CPU and memory monitoring script that collects metrics during k6 tests and saves them to CSV files.
- Implemented a mechanism to generate and upload charts for CPU and memory usage after the tests, providing visual insights into resource consumption.
- Updated artifact names for clarity and consistency.

This update improves observability of resource usage during load testing and enhances the reporting capabilities of the workflow.

Signed-off-by: Sagar Swami Rao Kulkarni <sagarswamirao@gmail.com>
- Added a new environment variable `K6_STAGES` to define load testing stages, specifying durations and target user counts.
- This enhancement allows for more controlled and gradual load testing, improving the accuracy of performance assessments.

This update aims to refine the load testing strategy and enhance the overall testing framework.

Signed-off-by: Sagar Swami Rao Kulkarni <sagarswamirao@gmail.com>
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.

1 participant