Documentation
¶
Index ¶
- type ActionType
- type Alert
- type AlertAction
- type AlertCondition
- type AlertRule
- type AlertSeverity
- type AlertStatus
- type AlertThresholds
- type AlertingSystem
- type AnalysisResult
- type AnalysisType
- type Anomaly
- type AnomalySeverity
- type AnomalyType
- type AppliedOptimization
- type Benchmark
- type BenchmarkConfig
- type BenchmarkReport
- type BenchmarkResult
- type BenchmarkScenario
- type BenchmarkSummary
- type Bottleneck
- type BottleneckSeverity
- type BottleneckType
- type CPUMetrics
- type CPUUsageStats
- type CapacityInfo
- type CapacityMetrics
- type ComparisonResult
- type ComplexityLevel
- type Constraint
- type ConstraintOperator
- type ConstraintType
- type CostBreakdown
- type CostEstimate
- type CostImpact
- type DemandForecast
- type DemandScenario
- type DiskMetrics
- type DiskUsageStats
- type EffortEstimate
- type ErrorStats
- type GrowthPattern
- type GrowthType
- type ImpactEstimate
- type ImpactLevel
- type ImpactMetrics
- type Improvement
- type ImprovementMetrics
- type InsightType
- type IssueSeverity
- type IssueType
- type MemoryMetrics
- type MemoryUsageStats
- type NetworkMetrics
- type NetworkUsageStats
- type Operation
- type OperationType
- type OptimizationConstraint
- type OptimizationLevel
- type OptimizationObjective
- type OptimizationResult
- type OptimizationTarget
- type OptimizationType
- type Optimizer
- type PatternExample
- type PatternType
- type PeakDemand
- type PercentileStats
- type PerformanceAnalyzer
- type PerformanceChange
- type PerformanceConfig
- type PerformanceImpact
- type PerformanceMetrics
- type PerformanceMonitor
- type PerformanceOptimizationResult
- type PerformanceOptimizer
- func (po *PerformanceOptimizer) AddAnalyzer(analyzer PerformanceAnalyzer)
- func (po *PerformanceOptimizer) AddBenchmark(benchmark Benchmark)
- func (po *PerformanceOptimizer) AddMonitor(monitor PerformanceMonitor)
- func (po *PerformanceOptimizer) AddOptimizer(optimizer Optimizer)
- func (po *PerformanceOptimizer) OptimizePerformance(ctx context.Context, target string) (*PerformanceOptimizationResult, error)
- type PerformancePattern
- type PerformanceScore
- type PerformanceThresholds
- type Prediction
- type PredictionScenario
- type PredictionType
- type ProjectedValue
- type ROIAnalysis
- type Recommendation
- type RecommendationEngine
- type RecommendationPriority
- type RecommendationStep
- type RecommendationType
- type Regression
- type RegressionSeverity
- type ResourceImpact
- type ResourceRecommendation
- type ResourceSpec
- type ResourceType
- type ResourceUsageStats
- type ResponseTimeStats
- type RiskImpact
- type RiskLevel
- type ScalingPhase
- type ScalingPrediction
- type ScalingPriority
- type ScalingRecommendation
- type ScalingRequirement
- type ScalingRequirements
- type ScalingTimeline
- type ScalingType
- type SeasonalPattern
- type StatisticalSignificance
- type TargetType
- type ThroughputStats
- type Trend
- type TrendAnalysis
- type TrendAnalyzer
- type TrendDirection
- type TrendInsight
- type TrendPrediction
- type TrendProjection
- type TrendReport
- type TrendSummary
- type ValidationIssue
- type ValidationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( ActionTypeEmail ActionType = "email" ActionTypeSlack ActionType = "slack" ActionTypeWebhook ActionType = "webhook" ActionTypePagerDuty ActionType = "pagerduty" ActionTypeAutoScale ActionType = "autoscale" ActionTypeRestart ActionType = "restart" )
type AlertAction ¶
type AlertAction struct {
Parameters map[string]any
Type ActionType
Target string
}
type AlertCondition ¶
type AlertCondition string
const ( AlertConditionGreater AlertCondition = "greater" AlertConditionLess AlertCondition = "less" AlertConditionEqual AlertCondition = "equal" AlertConditionChange AlertCondition = "change" )
type AlertRule ¶
type AlertRule struct {
ID string
Name string
Description string
Metric string
Condition AlertCondition
Severity AlertSeverity
Actions []AlertAction
Threshold float64
Duration time.Duration
Enabled bool
}
type AlertSeverity ¶
type AlertSeverity string
const ( AlertSeverityInfo AlertSeverity = "info" AlertSeverityWarning AlertSeverity = "warning" AlertSeverityError AlertSeverity = "error" AlertSeverityCritical AlertSeverity = "critical" )
type AlertStatus ¶
type AlertStatus string
const ( AlertStatusActive AlertStatus = "active" AlertStatusAcknowledged AlertStatus = "acknowledged" AlertStatusResolved AlertStatus = "resolved" AlertStatusSuppressed AlertStatus = "suppressed" )
type AlertThresholds ¶
type AlertingSystem ¶
type AlertingSystem interface {
RegisterAlert(alert AlertRule) error
TriggerAlert(ctx context.Context, alert Alert) error
GetActiveAlerts() []Alert
AcknowledgeAlert(alertID string) error
ResolveAlert(alertID string) error
}
AlertingSystem interface for performance alerts
type AnalysisResult ¶
type AnalysisResult struct {
Timestamp time.Time
AnalysisType AnalysisType
Bottlenecks []Bottleneck
Patterns []PerformancePattern
Anomalies []Anomaly
Trends []Trend
Predictions []Prediction
Recommendations []Recommendation
Score PerformanceScore
}
type AnalysisType ¶
type AnalysisType string
const ( AnalysisTypeRealTime AnalysisType = "realtime" AnalysisTypeBatch AnalysisType = "batch" AnalysisTypePredictive AnalysisType = "predictive" AnalysisTypeComparative AnalysisType = "comparative" )
type Anomaly ¶
type Anomaly struct {
Timestamp time.Time
Type AnomalyType
Metric string
Severity AnomalySeverity
Description string
Causes []string
Expected float64
Actual float64
Deviation float64
}
type AnomalySeverity ¶
type AnomalySeverity string
const ( AnomalySeverityLow AnomalySeverity = "low" AnomalySeverityMedium AnomalySeverity = "medium" AnomalySeverityHigh AnomalySeverity = "high" AnomalySeverityCritical AnomalySeverity = "critical" )
type AnomalyType ¶
type AnomalyType string
const ( AnomalyTypeSpike AnomalyType = "spike" AnomalyTypeDrop AnomalyType = "drop" AnomalyTypeFlat AnomalyType = "flat" AnomalyTypeOscillate AnomalyType = "oscillate" AnomalyTypeShift AnomalyType = "shift" )
type AppliedOptimization ¶
type AppliedOptimization struct {
Parameters map[string]any
Type OptimizationType
Description string
RollbackInfo string
Impact ImpactMetrics
Reversible bool
}
type Benchmark ¶
type Benchmark interface {
Run(ctx context.Context, config BenchmarkConfig) (BenchmarkResult, error)
GetBaseline() BenchmarkResult
SetBaseline(baseline BenchmarkResult) error
Compare(current, baseline BenchmarkResult) ComparisonResult
GenerateReport() BenchmarkReport
}
type BenchmarkConfig ¶
type BenchmarkReport ¶
type BenchmarkReport struct {
Timestamp time.Time
Version string
Results []BenchmarkResult
Comparisons []ComparisonResult
Trends TrendAnalysis
Summary BenchmarkSummary
}
type BenchmarkResult ¶
type BenchmarkResult struct {
StartTime time.Time
EndTime time.Time
CustomMetrics map[string]any
ErrorStats ErrorStats
Config BenchmarkConfig
ResourceUsage ResourceUsageStats
ResponseTimes ResponseTimeStats
Percentiles PercentileStats
Throughput ThroughputStats
Duration time.Duration
FailedRequests int64
SuccessfulReqs int64
TotalRequests int64
}
type BenchmarkScenario ¶
type BenchmarkScenario struct {
Name string
Operations []Operation
Constraints []Constraint
Weight float64
}
type BenchmarkSummary ¶
type Bottleneck ¶
type Bottleneck struct {
Type BottleneckType
Component string
Severity BottleneckSeverity
Impact ImpactLevel
Description string
Metrics map[string]float64
Suggestions []string
Priority int
}
type BottleneckSeverity ¶
type BottleneckSeverity string
const ( BottleneckSeverityLow BottleneckSeverity = "low" BottleneckSeverityMedium BottleneckSeverity = "medium" BottleneckSeverityHigh BottleneckSeverity = "high" BottleneckSeverityCritical BottleneckSeverity = "critical" )
type BottleneckType ¶
type BottleneckType string
const ( BottleneckTypeCPU BottleneckType = "cpu" BottleneckTypeMemory BottleneckType = "memory" BottleneckTypeDisk BottleneckType = "disk" BottleneckTypeNetwork BottleneckType = "network" BottleneckTypeDatabase BottleneckType = "database" BottleneckTypeCache BottleneckType = "cache" BottleneckTypeAPI BottleneckType = "api" )
type CPUMetrics ¶
type CPUUsageStats ¶
type CapacityInfo ¶
type CapacityMetrics ¶
type CapacityMetrics struct {
CPU CapacityInfo
Memory CapacityInfo
Storage CapacityInfo
Network CapacityInfo
}
type ComparisonResult ¶
type ComparisonResult struct {
OverallChange PerformanceChange
Improvements []Improvement
Regressions []Regression
Recommendations []string
Significance StatisticalSignificance
Baseline BenchmarkResult
Current BenchmarkResult
}
type ComplexityLevel ¶
type ComplexityLevel string
const ( ComplexityLevelLow ComplexityLevel = "low" ComplexityLevelMedium ComplexityLevel = "medium" ComplexityLevelHigh ComplexityLevel = "high" ComplexityLevelExpert ComplexityLevel = "expert" )
type Constraint ¶
type Constraint struct {
Type ConstraintType
Operator ConstraintOperator
Metric string
Value float64
}
type ConstraintOperator ¶
type ConstraintOperator string
const ( ConstraintOperatorLT ConstraintOperator = "lt" ConstraintOperatorLTE ConstraintOperator = "lte" ConstraintOperatorGT ConstraintOperator = "gt" ConstraintOperatorGTE ConstraintOperator = "gte" ConstraintOperatorEQ ConstraintOperator = "eq" )
type ConstraintType ¶
type ConstraintType string
const ( ConstraintTypeResponseTime ConstraintType = "response_time" ConstraintTypeThroughput ConstraintType = "throughput" ConstraintTypeErrorRate ConstraintType = "error_rate" ConstraintTypeMemory ConstraintType = "memory" ConstraintTypeCPU ConstraintType = "cpu" )
type CostBreakdown ¶
type CostEstimate ¶
type CostEstimate struct {
Current CostBreakdown
Projected CostBreakdown
Savings CostBreakdown
ROI ROIAnalysis
}
type CostImpact ¶
type DemandForecast ¶
type DemandForecast struct {
Methodology string
Scenarios []DemandScenario
TimeHorizon time.Duration
Confidence float64
}
type DemandScenario ¶
type DemandScenario struct {
Name string
Growth GrowthPattern
Peak PeakDemand
Probability float64
}
type DiskMetrics ¶
type DiskUsageStats ¶
type EffortEstimate ¶
type EffortEstimate struct {
Complexity ComplexityLevel
Skills []string
Resources []string
Dependencies []string
Hours float64
}
type ErrorStats ¶
type GrowthPattern ¶
type GrowthPattern struct {
Type GrowthType
Seasonality []SeasonalPattern
Rate float64
}
type GrowthType ¶
type GrowthType string
const ( GrowthTypeLinear GrowthType = "linear" GrowthTypeExponential GrowthType = "exponential" GrowthTypeLogarithmic GrowthType = "logarithmic" GrowthTypeSeasonal GrowthType = "seasonal" )
type ImpactEstimate ¶
type ImpactLevel ¶
type ImpactLevel string
const ( ImpactLevelMinimal ImpactLevel = "minimal" ImpactLevelLow ImpactLevel = "low" ImpactLevelModerate ImpactLevel = "moderate" ImpactLevelHigh ImpactLevel = "high" ImpactLevelSignificant ImpactLevel = "significant" )
type ImpactMetrics ¶
type ImpactMetrics struct {
Performance PerformanceImpact
Resource ResourceImpact
Cost CostImpact
Risk RiskImpact
}
type Improvement ¶
type ImprovementMetrics ¶
type InsightType ¶
type InsightType string
const ( InsightTypePerformance InsightType = "performance" InsightTypeCapacity InsightType = "capacity" InsightTypeEfficiency InsightType = "efficiency" InsightTypeReliability InsightType = "reliability" InsightTypeCost InsightType = "cost" )
type IssueSeverity ¶
type IssueSeverity string
const ( IssueSeverityInfo IssueSeverity = "info" IssueSeverityWarning IssueSeverity = "warning" IssueSeverityError IssueSeverity = "error" IssueSeverityCritical IssueSeverity = "critical" )
type MemoryMetrics ¶
type MemoryUsageStats ¶
type NetworkMetrics ¶
type NetworkUsageStats ¶
type OperationType ¶
type OperationType string
const ( OperationTypeHTTPGet OperationType = "http_get" OperationTypeHTTPPost OperationType = "http_post" OperationTypeHTTPPut OperationType = "http_put" OperationTypeHTTPDelete OperationType = "http_delete" OperationTypeDatabase OperationType = "database" OperationTypeCache OperationType = "cache" OperationTypeCompute OperationType = "compute" )
type OptimizationConstraint ¶
type OptimizationConstraint struct {
Type ConstraintType
Operator ConstraintOperator
Value float64
Priority int
}
type OptimizationLevel ¶
type OptimizationLevel string
const ( OptimizationLevelBasic OptimizationLevel = "basic" OptimizationLevelStandard OptimizationLevel = "standard" OptimizationLevelAggressive OptimizationLevel = "aggressive" OptimizationLevelExpert OptimizationLevel = "expert" )
type OptimizationObjective ¶
type OptimizationResult ¶
type OptimizationResult struct {
Timestamp time.Time
Target OptimizationTarget
Optimizations []AppliedOptimization
Errors []string
BeforeMetrics PerformanceMetrics
AfterMetrics PerformanceMetrics
Improvement ImprovementMetrics
Duration time.Duration
Success bool
}
type OptimizationTarget ¶
type OptimizationTarget struct {
Type TargetType
Component string
Constraints []OptimizationConstraint
Objectives []OptimizationObjective
Metrics PerformanceMetrics
}
type OptimizationType ¶
type OptimizationType string
const ( OptimizationTypeMemory OptimizationType = "memory" OptimizationTypeCPU OptimizationType = "cpu" OptimizationTypeIO OptimizationType = "io" OptimizationTypeNetwork OptimizationType = "network" OptimizationTypeAlgorithmic OptimizationType = "algorithmic" OptimizationTypeArchitectural OptimizationType = "architectural" )
type Optimizer ¶
type Optimizer interface {
Optimize(ctx context.Context, target OptimizationTarget) (OptimizationResult, error)
GetOptimizationType() OptimizationType
EstimateImpact(target OptimizationTarget) ImpactEstimate
ValidateOptimization(result OptimizationResult) ValidationResult
}
Optimizer interface for performance optimization
type PatternExample ¶
type PatternType ¶
type PatternType string
const ( PatternTypeCyclic PatternType = "cyclic" PatternTypeTrending PatternType = "trending" PatternTypeSpike PatternType = "spike" PatternTypeDrop PatternType = "drop" PatternTypeStable PatternType = "stable" PatternTypeVolatile PatternType = "volatile" )
type PeakDemand ¶
type PercentileStats ¶
type PerformanceAnalyzer ¶
type PerformanceAnalyzer interface {
Analyze(ctx context.Context, metrics []PerformanceMetrics) (AnalysisResult, error)
IdentifyBottlenecks(metrics PerformanceMetrics) []Bottleneck
GenerateRecommendations(analysis AnalysisResult) []Recommendation
PredictScaling(trends []PerformanceMetrics) ScalingPrediction
}
type PerformanceChange ¶
type PerformanceChange string
const ( PerformanceChangeImproved PerformanceChange = "improved" PerformanceChangeRegressed PerformanceChange = "regressed" PerformanceChangeUnchanged PerformanceChange = "unchanged" PerformanceChangeMixed PerformanceChange = "mixed" )
type PerformanceConfig ¶
type PerformanceConfig struct {
OptimizationLevel OptimizationLevel
AlertThresholds AlertThresholds
MonitoringInterval time.Duration
BenchmarkTimeout time.Duration
TrendAnalysisWindow time.Duration
RegressionThreshold float64
EnablePredictive bool
EnableAutoOptimize bool
}
PerformanceConfig configures performance optimization behavior
type PerformanceImpact ¶
type PerformanceMetrics ¶
type PerformanceMetrics struct {
Timestamp time.Time
CustomMetrics map[string]float64
CPUUsage CPUMetrics
MemoryUsage MemoryMetrics
DiskUsage DiskMetrics
NetworkMetrics NetworkMetrics
ResponseTime time.Duration
RequestCount int64
ErrorCount int64
ActiveUsers int64
Throughput float64
ErrorRate float64
}
Core performance types
type PerformanceMonitor ¶
type PerformanceMonitor interface {
StartMonitoring(ctx context.Context, target string) error
StopMonitoring() error
GetMetrics(ctx context.Context) (PerformanceMetrics, error)
DetectRegression(current, baseline PerformanceMetrics) bool
GetThresholds() PerformanceThresholds
SetThresholds(thresholds PerformanceThresholds) error
}
Performance interfaces
type PerformanceOptimizationResult ¶
type PerformanceOptimizationResult struct {
StartTime time.Time
EndTime time.Time
Monitoring map[string]PerformanceMetrics
Benchmarks map[string]BenchmarkResult
Analysis map[string]AnalysisResult
Optimizations map[string]OptimizationResult
Target string
Errors []string
PerformanceScore PerformanceScore
Duration time.Duration
}
PerformanceOptimizationResult contains comprehensive optimization results
type PerformanceOptimizer ¶
type PerformanceOptimizer struct {
// contains filtered or unexported fields
}
PerformanceOptimizer provides comprehensive performance monitoring and optimization
func NewPerformanceOptimizer ¶
func NewPerformanceOptimizer(config PerformanceConfig) *PerformanceOptimizer
NewPerformanceOptimizer creates a new performance optimizer
func (*PerformanceOptimizer) AddAnalyzer ¶
func (po *PerformanceOptimizer) AddAnalyzer(analyzer PerformanceAnalyzer)
AddAnalyzer adds a performance analyzer
func (*PerformanceOptimizer) AddBenchmark ¶
func (po *PerformanceOptimizer) AddBenchmark(benchmark Benchmark)
AddBenchmark adds a benchmark
func (*PerformanceOptimizer) AddMonitor ¶
func (po *PerformanceOptimizer) AddMonitor(monitor PerformanceMonitor)
AddMonitor adds a performance monitor
func (*PerformanceOptimizer) AddOptimizer ¶
func (po *PerformanceOptimizer) AddOptimizer(optimizer Optimizer)
AddOptimizer adds an optimizer
func (*PerformanceOptimizer) OptimizePerformance ¶
func (po *PerformanceOptimizer) OptimizePerformance(ctx context.Context, target string) (*PerformanceOptimizationResult, error)
OptimizePerformance performs comprehensive performance optimization
type PerformancePattern ¶
type PerformancePattern struct {
Type PatternType
Description string
Impact ImpactLevel
Examples []PatternExample
Frequency time.Duration
Confidence float64
}
type PerformanceScore ¶
type PerformanceThresholds ¶
type Prediction ¶
type Prediction struct {
Type PredictionType
Metric string
Scenario PredictionScenario
Assumptions []string
TimeHorizon time.Duration
Value float64
Confidence float64
}
type PredictionScenario ¶
type PredictionScenario string
const ( PredictionScenarioBest PredictionScenario = "best" PredictionScenarioExpected PredictionScenario = "expected" PredictionScenarioWorst PredictionScenario = "worst" )
type PredictionType ¶
type PredictionType string
const ( PredictionTypeCapacity PredictionType = "capacity" PredictionTypePerformance PredictionType = "performance" PredictionTypeFailure PredictionType = "failure" PredictionTypeScaling PredictionType = "scaling" )
type ProjectedValue ¶
type ROIAnalysis ¶
type Recommendation ¶
type Recommendation struct {
ID string
Title string
Description string
Type RecommendationType
Priority RecommendationPriority
Steps []RecommendationStep
References []string
Tags []string
Effort EffortEstimate
Impact ImpactEstimate
}
type RecommendationEngine ¶
type RecommendationEngine interface {
GenerateRecommendations(ctx context.Context, analysis AnalysisResult) ([]Recommendation, error)
PrioritizeRecommendations(recommendations []Recommendation) []Recommendation
EstimateImpact(recommendation Recommendation) ImpactEstimate
ValidateRecommendation(recommendation Recommendation) ValidationResult
}
RecommendationEngine interface for generating optimization recommendations
type RecommendationPriority ¶
type RecommendationPriority string
const ( RecommendationPriorityLow RecommendationPriority = "low" RecommendationPriorityMedium RecommendationPriority = "medium" RecommendationPriorityHigh RecommendationPriority = "high" RecommendationPriorityCritical RecommendationPriority = "critical" )
type RecommendationStep ¶
type RecommendationType ¶
type RecommendationType string
const ( RecommendationTypeOptimization RecommendationType = "optimization" RecommendationTypeScaling RecommendationType = "scaling" RecommendationTypeConfiguration RecommendationType = "configuration" RecommendationTypeArchitecture RecommendationType = "architecture" RecommendationTypeInfrastructure RecommendationType = "infrastructure" )
type Regression ¶
type RegressionSeverity ¶
type RegressionSeverity string
const ( RegressionSeverityMinor RegressionSeverity = "minor" RegressionSeverityModerate RegressionSeverity = "moderate" RegressionSeverityMajor RegressionSeverity = "major" RegressionSeverityCritical RegressionSeverity = "critical" )
type ResourceImpact ¶
type ResourceRecommendation ¶
type ResourceRecommendation struct {
Type ResourceType
Reason string
Current ResourceSpec
Proposed ResourceSpec
}
type ResourceSpec ¶
type ResourceType ¶
type ResourceType string
const ( ResourceTypeCPU ResourceType = "cpu" ResourceTypeMemory ResourceType = "memory" ResourceTypeStorage ResourceType = "storage" ResourceTypeNetwork ResourceType = "network" ResourceTypeInstance ResourceType = "instance" )
type ResourceUsageStats ¶
type ResourceUsageStats struct {
Memory MemoryUsageStats
CPU CPUUsageStats
Disk DiskUsageStats
Network NetworkUsageStats
}
type ResponseTimeStats ¶
type RiskImpact ¶
type ScalingPhase ¶
type ScalingPrediction ¶
type ScalingPrediction struct {
Recommendations []ScalingRecommendation
Timeline ScalingTimeline
PredictedDemand DemandForecast
CurrentCapacity CapacityMetrics
ScalingNeeds ScalingRequirements
CostEstimate CostEstimate
}
type ScalingPriority ¶
type ScalingPriority string
const ( ScalingPriorityLow ScalingPriority = "low" ScalingPriorityMedium ScalingPriority = "medium" ScalingPriorityHigh ScalingPriority = "high" ScalingPriorityCritical ScalingPriority = "critical" )
type ScalingRecommendation ¶
type ScalingRecommendation struct {
Type ScalingType
Description string
Risk RiskLevel
Resources []ResourceRecommendation
Benefits []string
Timeline time.Duration
Cost float64
}
type ScalingRequirement ¶
type ScalingRequirements ¶
type ScalingRequirements struct {
CPU ScalingRequirement
Memory ScalingRequirement
Storage ScalingRequirement
Network ScalingRequirement
}
type ScalingTimeline ¶
type ScalingTimeline struct {
Phases []ScalingPhase
Total time.Duration
}
type ScalingType ¶
type ScalingType string
const ( ScalingTypeVertical ScalingType = "vertical" ScalingTypeHorizontal ScalingType = "horizontal" ScalingTypeAuto ScalingType = "auto" ScalingTypeElastic ScalingType = "elastic" )
type SeasonalPattern ¶
type StatisticalSignificance ¶
type TargetType ¶
type TargetType string
const ( TargetTypeApplication TargetType = "application" TargetTypeDatabase TargetType = "database" TargetTypeCache TargetType = "cache" TargetTypeNetwork TargetType = "network" TargetTypeInfrastructure TargetType = "infrastructure" )
type ThroughputStats ¶
type Trend ¶
type Trend struct {
Metric string
Direction TrendDirection
Projection TrendProjection
Slope float64
Confidence float64
Duration time.Duration
}
type TrendAnalysis ¶
type TrendAnalysis struct {
// slices (24 bytes each)
Trends []Trend
Patterns []PerformancePattern
Anomalies []Anomaly
// time.Time (24 bytes)
Timestamp time.Time
// struct
Summary TrendSummary
// 8-byte aligned fields
Period time.Duration
Confidence float64
}
type TrendAnalyzer ¶
type TrendAnalyzer interface {
AnalyzeTrends(ctx context.Context, metrics []PerformanceMetrics) (TrendAnalysis, error)
PredictTrends(ctx context.Context, historical []PerformanceMetrics, horizon time.Duration) (TrendPrediction, error)
DetectAnomalies(ctx context.Context, metrics []PerformanceMetrics) ([]Anomaly, error)
GenerateTrendReport(analysis TrendAnalysis) TrendReport
}
TrendAnalyzer interface for trend analysis
type TrendDirection ¶
type TrendDirection string
const ( TrendDirectionUp TrendDirection = "up" TrendDirectionDown TrendDirection = "down" TrendDirectionStable TrendDirection = "stable" TrendDirectionVolatile TrendDirection = "volatile" )
type TrendInsight ¶
type TrendInsight struct {
Type InsightType
Description string
Impact ImpactLevel
Evidence []string
Actions []string
Confidence float64
}
type TrendPrediction ¶
type TrendPrediction struct {
Methodology string
Predictions []Prediction
Scenarios []PredictionScenario
Assumptions []string
TimeHorizon time.Duration
Confidence float64
}
type TrendProjection ¶
type TrendProjection struct {
Values []ProjectedValue
TimeHorizon time.Duration
Confidence float64
}
type TrendReport ¶
type TrendReport struct {
Timestamp time.Time
Insights []TrendInsight
Recommendations []Recommendation
Predictions TrendPrediction
Analysis TrendAnalysis
}
type TrendSummary ¶
type TrendSummary struct {
OverallDirection TrendDirection
Seasonality []SeasonalPattern
KeyInsights []string
Stability float64
Volatility float64
}
type ValidationIssue ¶
type ValidationIssue struct {
Type IssueType
Severity IssueSeverity
Description string
Impact string
Resolution string
}
type ValidationResult ¶
type ValidationResult struct {
Issues []ValidationIssue
Warnings []string
Suggestions []string
Score float64
Valid bool
}