hugo/hugolib/benchmark_test.go
2014-03-01 09:56:17 -05:00

17 lines
278 B
Go

package hugolib
import (
"bytes"
"os"
"testing"
)
func BenchmarkParsePage(b *testing.B) {
f, _ := os.Open("redis.cn.md")
sample := new(bytes.Buffer)
sample.ReadFrom(f)
b.ResetTimer()
for i := 0; i < b.N; i++ {
ReadFrom(bytes.NewReader(sample.Bytes()), "bench")
}
}