1
0
forked from rosa/hakurei

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>
This commit is contained in:
2026-05-01 03:42:14 +09:00
parent fc66f0bb47
commit 445d95023b
8 changed files with 52 additions and 9 deletions

View File

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