From 3d54d1f1767398e8cd17db34047203e090d2a9a9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 3 Apr 2026 20:50:09 +0900 Subject: internal/rosa: drop caches This enables accurate benchmarking of the toolchain abstraction. Signed-off-by: Ophestra --- internal/rosa/all_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/rosa/all_test.go') diff --git a/internal/rosa/all_test.go b/internal/rosa/all_test.go index 407dc178..f97ebbdf 100644 --- a/internal/rosa/all_test.go +++ b/internal/rosa/all_test.go @@ -19,6 +19,18 @@ func TestLoad(t *testing.T) { } } +func BenchmarkAll(b *testing.B) { + for b.Loop() { + for i := range rosa.PresetEnd { + rosa.Std.Load(rosa.PArtifact(i)) + } + + b.StopTimer() + rosa.DropCaches() + b.StartTimer() + } +} + func TestResolveName(t *testing.T) { t.Parallel() -- cgit v1.3.1