@@ -1,63 +0,0 @@
8−func BenchmarkAnimationUpdate(b *testing.B) {
9− anim := New(30, "Loading test data")
12− for i := 0; i < b.N; i++ {
13− // Simulate character cycling update
14− _, _ = anim.Update(StepCharsMsg{id: anim.ID()})
18−func BenchmarkAnimationView(b *testing.B) {
19− anim := New(30, "Loading test data")
21− // Initialize with some cycling
22− for i := 0; i < 10; i++ {
23− anim.Update(StepCharsMsg{id: anim.ID()})
27− for i := 0; i < b.N; i++ {
32−func BenchmarkRandomRune(b *testing.B) {
36− for i := 0; i < b.N; i++ {
41−func TestAnimationPerformance(t *testing.T) {
42− anim := New(30, "Performance test")
47− // Simulate rapid updates
48− for i := 0; i < iterations; i++ {
49− anim.Update(StepCharsMsg{id: anim.ID()})
53− duration := time.Since(start)
54− avgPerUpdate := duration / time.Duration(iterations)
56− // Should complete 1000 updates in reasonable time
57− if avgPerUpdate > time.Millisecond {
58− t.Errorf("Animation update too slow: %v per update (should be < 1ms)", avgPerUpdate)
61− t.Logf("Animation performance: %v per update (%d updates in %v)",
62− avgPerUpdate, iterations, duration)