Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit ef857c2

Browse files
committed
add cedar benchmark test code and update go mod file
1 parent 4b5cae7 commit ef857c2

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

cedar_bm_test.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cedar
2+
3+
import (
4+
"testing"
5+
6+
"github.com/vcaesar/tt"
7+
)
8+
9+
func init() {
10+
loadTestData()
11+
}
12+
13+
func BenchmarkPrefixMatch(t *testing.B) {
14+
fn := func() {
15+
cd.PrefixMatch([]byte("abcdefg"), 0)
16+
}
17+
18+
tt.BM(t, fn)
19+
}

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module github.com/go-ego/cedar
22

33
go 1.13
4+
5+
require github.com/vcaesar/tt v0.0.0-20191103173835-6896a351024b

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/vcaesar/tt v0.0.0-20191103173835-6896a351024b h1:psGhQitWSo4KBpLghvJPlhHxTJ8LQl1y0ekjSreqvu4=
2+
github.com/vcaesar/tt v0.0.0-20191103173835-6896a351024b/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg=

0 commit comments

Comments
 (0)