Skip to content

feat(metrics): add CSV extraction and CI workflow#734

Open
Chennamma-Hotkar wants to merge 2 commits into
urunc-dev:mainfrom
Chennamma-Hotkar:feat/issue-104-automate-metrics
Open

feat(metrics): add CSV extraction and CI workflow#734
Chennamma-Hotkar wants to merge 2 commits into
urunc-dev:mainfrom
Chennamma-Hotkar:feat/issue-104-automate-metrics

Conversation

@Chennamma-Hotkar
Copy link
Copy Markdown

@Chennamma-Hotkar Chennamma-Hotkar commented May 31, 2026

Description

The timestamp instrumentation already exists in the urunc codebase but there was no automated way to extract and store results.

This PR wires the existing measurement scripts into CI:

  • Adds measure_to_csv.py to produce per-container CSV timing output
  • Makes spawnContainer() and deleteContainer() configurable to support different unikernel images
  • Adds metrics.yml workflow to run weekly measurements for solo5-hvt and unikraft-nginx and upload CSV as GitHub Actions artifacts

Note: kill and delete timestamps are not yet instrumented in the Go codebase. This PR captures create, start, network and disk phases.

Related issues

How was this tested?

Script validated locally using mock timestamp data:

Linter (flake8):
Screenshot 2026-05-31 094327

CSV output verified:
Screenshot 2026-05-31 094358

LLM usage

N/A

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

Add measure_to_csv.py to output per-container timing CSV.
Make spawnContainer() and deleteContainer() configurable.
Add metrics.yml to run weekly measurements and upload artifacts.

Closes urunc-dev#104

Signed-off-by: Chennamma-Hotkar <channuhotkar@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 31, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 2a29d93
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a1cf7b22ac0b300084693b0
😎 Deploy Preview https://deploy-preview-734--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@mdryaan mdryaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Chennamma-Hotkar, refactoring is clean and the overall structure of measure_to_csv.py looks solid. I left two inline comments: one about a possible off-by-one on the start_ns timestamp ID at line 29, and one about the action pinning convention in metrics.yml. Happy to be corrected if either is intentional.

Comment thread script/performance/measure_to_csv.py Outdated
# Key phase definitions: (start_tsID, end_tsID, column_name)
PHASES = [
("TS00", "TS11", "create_ns"), # full create phase
("TS12", "TS19", "start_ns"), # full start phase
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed "TS19" is used as the end timestamp for start_ns, but checking internal/metrics/schema.go the last defined timestamp is TS18 (RX.execve_hypervisor) TimestampCount (value 19) is a sentinel and is never written to the log file. Because get_phase_duration returns "N/A" when the end key isn't found in the map, start_ns would always come out as "N/A" in every CSV row. worth double-checking if TS18 is the intended end of the start phase, the fix would be: ("TS12", "TS18", "start_ns")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Changed TS19 to TS18 in commit 2a29d93. Thanks for catching that!

Comment thread .github/workflows/metrics.yml Outdated

steps:
- name: Checkout code
uses: actions/checkout@v4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if intentional, but the other workflows in this repo all pin actions to a full commit SHA with a version comment ,no floating @v4 references anywhere else in .github/workflows/. Might be worth pinning to match the project pattern:

uses: actions/checkout@ # v4
uses: actions/upload-artifact@ # v4

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Pinned both actions to full commit SHAs in commit 2a29d93 to match the project convention.

@Chennamma-Hotkar
Copy link
Copy Markdown
Author

Hi @mdryaan, I’ll link both actions against the full commit SHAs in accordance with the project policy. Please let me know if you can refer me to the SHA used by other workflows. Should I refer to an existing workflow such as ci_on_push.yml instead?

Fix off-by-one: TS19 is TimestampCount sentinel, use TS18
(RX.execve_hypervisor) as end of start phase.
Pin actions/checkout and actions/upload-artifact to full
commit SHAs to match project convention.

Signed-off-by: Chennamma-Hotkar <channuhotkar@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.

automate the extraction of metrics

2 participants