23 lines
371 B
Go
Raw Normal View History

2017-07-05 02:34:06 +00:00
package benchmarks
import (
"testing"
"github.com/animenotifier/arn"
)
2017-11-11 11:50:01 +00:00
func BenchmarkDatabaseGetAnimeList(b *testing.B) {
2017-07-05 02:34:06 +00:00
b.ReportAllocs()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
list, _ := arn.DB.Get("AnimeList", "4J6qpK1ve")
animeList := list.(*arn.AnimeList)
noop(animeList)
2017-07-05 02:34:06 +00:00
}
})
}
func noop(list *arn.AnimeList) {}