all repos — grayfriday @ 3fe4ad2966c2e89ddf44138064697a8eb034dec3

blackfriday fork with a few changes

Enable common extensions for benchmark

Also, reset the timer after loading test data.
Vytautas Ĺ altenis vytas@rtfb.lt
Sat, 30 Jul 2016 21:40:13 +0300
commit

3fe4ad2966c2e89ddf44138064697a8eb034dec3

parent

c61b63f42c03b4ab7d30a79fd661c242202cf6d0

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M ref_test.goref_test.go

@@ -80,7 +80,7 @@ // code so that compiler could never optimize away the call to runMarkdown()

var benchResultAnchor string func BenchmarkReference(b *testing.B) { - params := TestParams{Options: Options{Extensions: NoExtensions}} + params := TestParams{Options: Options{Extensions: CommonExtensions}} files := []string{ "Amps and angle encoding", "Auto links",

@@ -115,6 +115,7 @@ continue

} tests = append(tests, string(inputBytes)) } + b.ResetTimer() for n := 0; n < b.N; n++ { for _, test := range tests { benchResultAnchor = runMarkdown(test, params)