27 lines
445 B
Go
Raw Normal View History

2024-07-03 09:39:24 +00:00
package tests_test
2024-06-16 14:57:33 +00:00
import (
"testing"
"git.akyoto.dev/cli/q/src/build"
2024-06-28 13:34:25 +00:00
"git.akyoto.dev/go/assert"
2024-06-16 14:57:33 +00:00
)
func BenchmarkEmpty(b *testing.B) {
2024-07-03 09:39:24 +00:00
compiler := build.New("benchmarks/empty.q")
2024-06-16 14:57:33 +00:00
for i := 0; i < b.N; i++ {
2024-06-28 13:34:25 +00:00
_, err := compiler.Run()
assert.Nil(b, err)
2024-06-16 14:57:33 +00:00
}
}
func BenchmarkExpressions(b *testing.B) {
2024-07-03 09:39:24 +00:00
compiler := build.New("benchmarks/expressions.q")
2024-06-16 14:57:33 +00:00
for i := 0; i < b.N; i++ {
2024-06-28 13:34:25 +00:00
_, err := compiler.Run()
assert.Nil(b, err)
2024-06-16 14:57:33 +00:00
}
}