Fixed benchmarks

This commit is contained in:
2018-10-29 13:47:13 +09:00
parent c090b6970c
commit 7e07923177
2 changed files with 4 additions and 24 deletions

View File

@ -10,11 +10,11 @@ import (
func BenchmarkRenderThread(b *testing.B) {
thread, _ := arn.GetThread("HJgS7c2K")
thread.HTML() // Pre-render markdown
replies := thread.Posts()
replies, _ := arn.FilterPosts(func(post *arn.Post) bool {
post.HTML() // Pre-render markdown
return post.ThreadID == thread.ID
})
for _, reply := range replies {
reply.HTML() // Pre-render markdown
}
b.ReportAllocs()
b.ResetTimer()