saveprofile

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	SchemaVersion     int                         `json:"schema_version"`
	RequestedEngine   model.EngineType            `json:"requested_engine"`
	EffectiveEngine   model.EngineType            `json:"effective_engine,omitempty"`
	OptimizedTransfer bool                        `json:"optimized_transfer"`
	CloneMode         string                      `json:"clone_mode,omitempty"`
	PerformanceClass  string                      `json:"performance_class,omitempty"`
	TotalDurationMS   int64                       `json:"total_duration_ms"`
	PhaseDurationsMS  map[string]int64            `json:"phase_durations_ms"`
	PhaseCounts       map[string]map[string]int64 `json:"phase_counts,omitempty"`
}

Profile is the stable public save --json timing surface. It intentionally records roles, engines, durations, and counts, but never filesystem paths.

func (*Profile) ApplyDescriptorFallback

func (p *Profile) ApplyDescriptorFallback(desc *model.Descriptor)

func (*Profile) ApplyTransfer

func (p *Profile) ApplyTransfer(record *transfer.Record)

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

Recorder accumulates save profile observations across CLI and snapshot layers without exposing private path data.

func New

func New(requestedEngine model.EngineType) *Recorder

func (*Recorder) AddCounts

func (r *Recorder) AddCounts(name string, counts map[string]int64)

func (*Recorder) AddDuration

func (r *Recorder) AddDuration(name string, duration time.Duration)

func (*Recorder) AddPhase

func (r *Recorder) AddPhase(name string, duration time.Duration, counts map[string]int64)

func (*Recorder) Merge

func (r *Recorder) Merge(profile Profile)

func (*Recorder) Profile

func (r *Recorder) Profile(record *transfer.Record) Profile

func (*Recorder) Step

func (r *Recorder) Step(name string, fn func() error) error

Jump to

Keyboard shortcuts

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