phaselog

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package phaselog renders the per-actor "timing breakdown" log record an worker emits for each checkpoint and restore. Every worker binary times its own phases, which are implementation details of that runtime; this package holds the shape they share so the records of all workers carry the same identity, fidelity and key layout, and atelet's own record joins to any of them.

Index

Constants

View Source
const (
	RestoreDurationKey    = "ateworker.actor.restore.duration"
	CheckpointDurationKey = "ateworker.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 worker, so they stay a developer-facing log record rather than becoming metric API. They decompose the worker_restore / worker_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 ateworkerpb.SnapshotFidelity) string

FidelityLogValue maps the worker 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 ateworkerpb.SnapshotFidelity, durationKey string, err error, phases []Phase)

LogSnapshotPhases emits the SnapshotPhaseAttrs record under msg.

func SnapshotPhaseAttrs

func SnapshotPhaseAttrs(a resources.ActorAttribution, fidelity ateworkerpb.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

type Phase struct {
	Name string
	D    time.Duration
}

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 worker defines its own names, with ateattr.SnapshotPhaseTotal shared so the two layers' records agree on the denominator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL