aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/all_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-01 03:42:14 +0900
committerOphestra <cat@gensokyo.uk>2026-05-01 03:42:48 +0900
commit445d95023b1d9d152417838c4edad54f7bf4efe3 (patch)
tree95ba56140b93cc3220472f16a6c9e699d8c5a83e /internal/rosa/all_test.go
parentfc66f0bb47dd4634f81aa67bf8fc092945643520 (diff)
internal/rosa: global preset flags
These changes preset behaviour globally. Useful for ad hoc workarounds for development or bootstrapping on resource-constrained systems. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/all_test.go')
-rw-r--r--internal/rosa/all_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/rosa/all_test.go b/internal/rosa/all_test.go
index f97ebbdf..52eabf39 100644
--- a/internal/rosa/all_test.go
+++ b/internal/rosa/all_test.go
@@ -20,13 +20,16 @@ func TestLoad(t *testing.T) {
}
func BenchmarkAll(b *testing.B) {
+ flags := rosa.Flags()
+ b.Cleanup(func() { rosa.DropCaches(flags) })
+
for b.Loop() {
for i := range rosa.PresetEnd {
rosa.Std.Load(rosa.PArtifact(i))
}
b.StopTimer()
- rosa.DropCaches()
+ rosa.DropCaches(0)
b.StartTimer()
}
}