1
0
forked from rosa/hakurei

internal/rosa: drop caches

This enables accurate benchmarking of the toolchain abstraction.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-03 20:50:09 +09:00
parent 9feac7738f
commit 3d54d1f176
3 changed files with 33 additions and 0 deletions

View File

@@ -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()