Documentation
¶
Index ¶
- type DataPoint
- type LaunchSpeedTracker
- type LaunchStats
- type Metric
- type OperationTimer
- type PerformanceMonitor
- func (pm *PerformanceMonitor) GetMetric(name string) (*Metric, bool)
- func (pm *PerformanceMonitor) GetMetrics() map[string]*Metric
- func (pm *PerformanceMonitor) GetSummary() PerformanceSummary
- func (pm *PerformanceMonitor) RecordTiming(operation string, duration time.Duration)
- func (pm *PerformanceMonitor) RecordValue(name string, value float64, unit string)
- func (pm *PerformanceMonitor) Start(ctx context.Context)
- func (pm *PerformanceMonitor) StartOperation(operation string) *OperationTimer
- type PerformanceSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LaunchSpeedTracker ¶
type LaunchSpeedTracker struct {
// contains filtered or unexported fields
}
LaunchSpeedTracker specifically tracks launch performance improvements
func NewLaunchSpeedTracker ¶
func NewLaunchSpeedTracker(monitor *PerformanceMonitor) *LaunchSpeedTracker
NewLaunchSpeedTracker creates a launch speed tracker
func (*LaunchSpeedTracker) GetLaunchStats ¶
func (lst *LaunchSpeedTracker) GetLaunchStats() LaunchStats
GetLaunchStats returns launch performance statistics
func (*LaunchSpeedTracker) TrackLaunchPhase ¶
func (lst *LaunchSpeedTracker) TrackLaunchPhase(phase string, duration time.Duration)
TrackLaunchPhase tracks timing for a specific launch phase
func (*LaunchSpeedTracker) TrackTotalLaunchTime ¶
func (lst *LaunchSpeedTracker) TrackTotalLaunchTime(duration time.Duration, templateName string)
TrackTotalLaunchTime tracks overall launch time
type LaunchStats ¶
type LaunchStats struct {
AverageTotalTime float64 `json:"average_total_time_ms"`
PhaseTimings map[string]float64 `json:"phase_timings_ms"`
TemplateTimings map[string]float64 `json:"template_timings_ms"`
}
LaunchStats contains launch performance statistics
type Metric ¶
type Metric struct {
Name string `json:"name"`
Value float64 `json:"value"`
Unit string `json:"unit"`
LastUpdated time.Time `json:"last_updated"`
History []DataPoint `json:"history,omitempty"`
}
Metric represents a performance metric
type OperationTimer ¶
type OperationTimer struct {
// contains filtered or unexported fields
}
OperationTimer tracks timing for operations
func (*OperationTimer) End ¶
func (ot *OperationTimer) End() time.Duration
EndOperation completes timing an operation
type PerformanceMonitor ¶
type PerformanceMonitor struct {
// contains filtered or unexported fields
}
PerformanceMonitor tracks system performance metrics
func NewPerformanceMonitor ¶
func NewPerformanceMonitor() *PerformanceMonitor
NewPerformanceMonitor creates a new performance monitor
func (*PerformanceMonitor) GetMetric ¶
func (pm *PerformanceMonitor) GetMetric(name string) (*Metric, bool)
GetMetric returns a specific metric
func (*PerformanceMonitor) GetMetrics ¶
func (pm *PerformanceMonitor) GetMetrics() map[string]*Metric
GetMetrics returns all current metrics
func (*PerformanceMonitor) GetSummary ¶
func (pm *PerformanceMonitor) GetSummary() PerformanceSummary
GetSummary returns a performance summary
func (*PerformanceMonitor) RecordTiming ¶
func (pm *PerformanceMonitor) RecordTiming(operation string, duration time.Duration)
RecordTiming records timing for an operation
func (*PerformanceMonitor) RecordValue ¶
func (pm *PerformanceMonitor) RecordValue(name string, value float64, unit string)
RecordValue records a custom metric value
func (*PerformanceMonitor) Start ¶
func (pm *PerformanceMonitor) Start(ctx context.Context)
Start begins performance monitoring
func (*PerformanceMonitor) StartOperation ¶
func (pm *PerformanceMonitor) StartOperation(operation string) *OperationTimer
StartOperation begins timing an operation
type PerformanceSummary ¶
type PerformanceSummary struct {
Uptime time.Duration `json:"uptime"`
MemoryUsageMB float64 `json:"memory_usage_mb"`
Goroutines int `json:"goroutines"`
GCCycles uint32 `json:"gc_cycles"`
LastGCPause time.Duration `json:"last_gc_pause"`
MetricCount int `json:"metric_count"`
OperationTimings map[string]float64 `json:"operation_timings"`
}
PerformanceSummary provides a high-level performance overview