Skip to content

microVM worker: per-Exec timing needs SH_EXEC_TIMING=1 #982

Closed

Description

@webchang

Observation. Per-Exec timing on the microVM worker needs a per-window setting.

  • The always-on vmpool: exec req= workspace_key= kind= vm= cold= exit= err= line (remote-worker/internal/vmpool/runner.go, execLog in Runner.Run) names the workspace, kind and VM of each Exec, but no time. A reader has only the journal's own timestamp, in whole seconds by default.
  • The Exec's start and duration appear only on the exec-timing line, which is logged only with SH_EXEC_TIMING=1 (cmd/microvm-worker; internal/vmpool/diag.go, logExecTiming). Neither deploy/sbx's unit nor its env sets it.
  • So an operator, or a tool joining a session's commands to the worker's Execs, has to enable timing before the work it wants to look at. It can't recover the timing afterwards.

Proposal. Put start_ms and dur_ms on the always-on line, with the same values as exec-timing, and keep exec-timing opt-in for its phase and CPU detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions