analytics

package
v0.0.0-...-b180f38 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UsageAnalyzer

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

func NewUsageAnalyzer

func NewUsageAnalyzer(
	tracker *tracking.KeyUsageTracker,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *UsageAnalyzer

func (*UsageAnalyzer) AnalyzeUsage

func (ua *UsageAnalyzer) AnalyzeUsage(ctx context.Context, keyID string, period time.Duration) (*UsageInsight, error)

func (*UsageAnalyzer) GetInsight

func (ua *UsageAnalyzer) GetInsight(ctx context.Context, keyID string) (*UsageInsight, error)

type UsageInsight

type UsageInsight struct {
	KeyID              string
	Period             time.Duration
	TotalOperations    int64
	OperationBreakdown map[string]int64
	AverageLatency     time.Duration
	ErrorRate          float64
	UsagePatterns      map[string]float64
	Recommendations    []string
	LastUpdated        time.Time
}

type UsagePattern

type UsagePattern struct {
	ID          string
	KeyID       string
	PatternType string
	Frequency   int64
	FirstSeen   time.Time
	LastSeen    time.Time
	Metadata    map[string]interface{}
}

type UsagePatternAnalyzer

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

Jump to

Keyboard shortcuts

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