Documentation
¶
Overview ¶
Package ateomphaselog renders the per-actor "timing breakdown" log record an ateom emits for each checkpoint and restore. Every ateom binary times its own phases, which are implementation details of that runtime; this package holds the shape they share so the records of all ateoms carry the same identity, fidelity and key layout, and atelet's own record joins to any of them.
Index ¶
Constants ¶
const ( RestoreDurationKey = "ateom.actor.restore.duration" CheckpointDurationKey = "ateom.actor.checkpoint.duration" )
The keys the per-phase durations are logged under. They are named like instruments but deliberately are not ones: the phases are implementation details of each ateom, so they stay a developer-facing log record rather than becoming metric API. They decompose the ateom_restore / ateom_checkpoint phases of atelet's ate.actor.*.duration histograms, whose names they extend, and are joined per actor by benchmarking tooling.
Variables ¶
This section is empty.
Functions ¶
func FidelityLogValue ¶
func FidelityLogValue(fidelity ateompb.SnapshotFidelity) string
FidelityLogValue maps the ateom wire enum onto the shared fidelity label values, the same way ateattr.SnapshotFidelityValue does for the atelet enum. An unrecognized fidelity reports as unknown rather than stringified, so no wire value can widen the value set readers key on.
func LogSnapshotPhases ¶
func LogSnapshotPhases(ctx context.Context, msg string, a resources.ActorAttribution, fidelity ateompb.SnapshotFidelity, durationKey string, err error, phases []Phase)
LogSnapshotPhases emits the SnapshotPhaseAttrs record under msg.
func SnapshotPhaseAttrs ¶
func SnapshotPhaseAttrs(a resources.ActorAttribution, fidelity ateompb.SnapshotFidelity, durationKey string, err error, phases []Phase) []slog.Attr
SnapshotPhaseAttrs renders one joinable per-actor record for a checkpoint or restore, mirroring atelet's snapshotLogAttrs: full actor identity, the scope, and one float-seconds attr per non-zero phase under durationKey.<phase>. One record carries every phase of the operation, so a reader never joins two half-records that disagree about the same actor.
err is the operation's outcome. A failed operation still records the phases it completed, marked with error.type (the gRPC code, context errors as DeadlineExceeded / Canceled) so a reader can leave it out of a latency distribution. Absence means success.
Types ¶
type Phase ¶
Phase is one timed step of a snapshot operation. A zero duration means the phase never ran (a VOLUMES checkpoint captures no guest) and is skipped rather than logged as instant. Name is suffixed onto the duration key; each ateom defines its own names, with ateattr.SnapshotPhaseTotal shared so the two layers' records agree on the denominator.