diff --git a/markitzero_test.go b/markitzero_test.go index 6cd176b..2f39fcb 100644 --- a/markitzero_test.go +++ b/markitzero_test.go @@ -1,6 +1,7 @@ package main import ( + "strings" "testing" ) @@ -106,3 +107,22 @@ para output := `hello
para
` doonezerotest(t, input, output) } + +var benchData, simpleData string + +func init() { + benchData = strings.Repeat("hello there sir. It is a **fine** day for some testing!\n", 100) + simpleData = strings.Repeat("just a few words\n", 100) +} + +func BenchmarkModerateSize(b *testing.B) { + for n := 0; n < b.N; n++ { + markitzero(benchData) + } +} + +func BenchmarkSimpleData(b *testing.B) { + for n := 0; n < b.N; n++ { + markitzero(simpleData) + } +}