forked from rosa/hakurei
internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
33
internal/rosa/state_test.go
Normal file
33
internal/rosa/state_test.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package rosa_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"hakurei.app/internal/rosa"
|
||||
)
|
||||
|
||||
func TestLoad(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, p := range rosa.Native().Collect() {
|
||||
t.Run(rosa.Native().MustGet(p).Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
rosa.Native().Load(rosa.Std, p)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkAll(b *testing.B) {
|
||||
s := rosa.Native().Clone()
|
||||
|
||||
for b.Loop() {
|
||||
for _, p := range s.Collect() {
|
||||
s.Load(rosa.Std, p)
|
||||
}
|
||||
|
||||
b.StopTimer()
|
||||
s.DropCaches("", 0)
|
||||
b.StartTimer()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user