Documentation
¶
Index ¶
- func Run(cfg *config.Config) error
- type PerformanceMetric
- type TestHarness
- func (th *TestHarness) RecordMetric(metric PerformanceMetric)
- func (th *TestHarness) RunComprehensiveTest() map[string]interface{}
- func (th *TestHarness) StartTest(testName string)
- func (th *TestHarness) StopTest(testName string) TestResult
- func (th *TestHarness) TestErrorDisplayPerformance(errorCounts []int) map[int]TestResult
- func (th *TestHarness) TestListPerformance(itemCounts []int) map[int]TestResult
- func (th *TestHarness) TestProgressPerformance(updateIntervals []time.Duration) map[time.Duration]TestResult
- func (th *TestHarness) TestSpinnerPerformance(targetFPS []int) map[int]TestResult
- type TestResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PerformanceMetric ¶
type PerformanceMetric struct {
Timestamp time.Time
FrameRate float64
MemoryUsage uint64
GoroutineCount int
RenderTime time.Duration
UpdateTime time.Duration
ComponentType string
ItemCount int
CPUUsage float64
}
PerformanceMetric represents a single performance measurement
type TestHarness ¶
type TestHarness struct {
// contains filtered or unexported fields
}
TestHarness provides performance testing capabilities for UI components
func NewTestHarness ¶
func NewTestHarness() *TestHarness
NewTestHarness creates a new performance test harness
func (*TestHarness) RecordMetric ¶
func (th *TestHarness) RecordMetric(metric PerformanceMetric)
RecordMetric records a performance metric
func (*TestHarness) RunComprehensiveTest ¶
func (th *TestHarness) RunComprehensiveTest() map[string]interface{}
RunComprehensiveTest runs all performance tests
func (*TestHarness) StartTest ¶
func (th *TestHarness) StartTest(testName string)
StartTest begins performance monitoring
func (*TestHarness) StopTest ¶
func (th *TestHarness) StopTest(testName string) TestResult
StopTest ends performance monitoring and returns results
func (*TestHarness) TestErrorDisplayPerformance ¶
func (th *TestHarness) TestErrorDisplayPerformance(errorCounts []int) map[int]TestResult
TestErrorDisplayPerformance tests error display with multiple errors
func (*TestHarness) TestListPerformance ¶
func (th *TestHarness) TestListPerformance(itemCounts []int) map[int]TestResult
TestListPerformance tests list component performance with large datasets
func (*TestHarness) TestProgressPerformance ¶
func (th *TestHarness) TestProgressPerformance(updateIntervals []time.Duration) map[time.Duration]TestResult
TestProgressPerformance tests progress component with real-time updates
func (*TestHarness) TestSpinnerPerformance ¶
func (th *TestHarness) TestSpinnerPerformance(targetFPS []int) map[int]TestResult
TestSpinnerPerformance tests spinner component at different frame rates
type TestResult ¶
type TestResult struct {
TestName string
Duration time.Duration
SampleCount int
AverageFrameRate float64
MinFrameRate float64
MaxFrameRate float64
AverageMemory uint64
MaxMemory uint64
AverageRenderTime time.Duration
MaxRenderTime time.Duration
TargetsMet map[string]bool
Success bool
Details map[string]interface{}
}
TestResult represents the results of a performance test