package core import "testing" func BenchmarkOverviewCascade(b *testing.B) { m := NewMonitor() m.SetOutput(900, 600) m.SetMaxColumns(3) m.SetOverflow(OverflowCascade) for id := WindowID(1); id <= 7; id++ { m.AddWindow(id) } m.ToggleOverview() buf := m.Layout() b.ReportAllocs() b.ResetTimer() for range b.N { buf = m.layoutInto(buf[:0]) } }