Renamed files
All checks were successful
/ test (push) Successful in 13s

This commit is contained in:
Eduard Urbach 2025-06-12 11:48:47 +02:00
parent 53d5c60b2e
commit f0be7fcd1f
Signed by: eduard
GPG key ID: 49226B848C78F6C8
2 changed files with 0 additions and 0 deletions

39
bench_test.go Normal file
View file

@ -0,0 +1,39 @@
package markdown_test
import (
"os"
"testing"
"git.urbach.dev/go/assert"
"git.urbach.dev/go/markdown"
)
func BenchmarkSmall(b *testing.B) {
small, err := os.ReadFile("testdata/small.md")
assert.Nil(b, err)
input := string(small)
for b.Loop() {
markdown.Render(input)
}
}
func BenchmarkMedium(b *testing.B) {
medium, err := os.ReadFile("testdata/medium.md")
assert.Nil(b, err)
input := string(medium)
for b.Loop() {
markdown.Render(input)
}
}
func BenchmarkLarge(b *testing.B) {
large, err := os.ReadFile("testdata/large.md")
assert.Nil(b, err)
input := string(large)
for b.Loop() {
markdown.Render(input)
}
}