We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8a98d0 commit 2e51b7cCopy full SHA for 2e51b7c
tagexpr_test.go
@@ -22,7 +22,6 @@ import (
22
)
23
24
func BenchmarkTagExpr(b *testing.B) {
25
- b.StopTimer()
26
type T struct {
27
a int `bench:"$%3"`
28
}
@@ -32,7 +31,7 @@ func BenchmarkTagExpr(b *testing.B) {
32
31
b.Fatal(err)
33
34
b.ReportAllocs()
35
- b.StartTimer()
+ b.ResetTimer()
36
var t = &T{10}
37
for i := 0; i < b.N; i++ {
38
tagExpr, err := vm.Run(t)
@@ -46,12 +45,11 @@ func BenchmarkTagExpr(b *testing.B) {
46
45
47
48
func BenchmarkReflect(b *testing.B) {
49
50
51
a int `remainder:"3"`
52
53
54
55
var t = &T{1}
56
57
v := reflect.ValueOf(t).Elem()
0 commit comments