ui

package
v0.0.0-...-56f785d Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *config.Config) error

Run starts the Bubble Tea UI application

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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