Skip to content

Commit

Permalink
update benchmark code
Browse files Browse the repository at this point in the history
  • Loading branch information
caibirdme committed Jul 27, 2019
1 parent 69616aa commit 0b7f991
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func Test_BuildSelect(t *testing.T) {

func BenchmarkBuildSelect_Sequelization(b *testing.B) {
for i := 0; i < b.N; i++ {
BuildSelect("tb", map[string]interface{}{
_,_,err := BuildSelect("tb", map[string]interface{}{
"foo": "bar",
"qq": "tt",
"age in": []interface{}{1, 3, 5, 7, 9},
Expand All @@ -338,6 +338,9 @@ func BenchmarkBuildSelect_Sequelization(b *testing.B) {
"_groupby": "department",
"_limit": []uint{0, 100},
}, []string{"a", "b", "c"})
if err != nil {
b.FailNow()
}
}
}

Expand All @@ -355,7 +358,7 @@ func BenchmarkBuildSelect_Parallel(b *testing.B) {
"_limit": []uint{0, 100},
}, nil)
if cond != expectCond {
b.Errorf("should be %s but %s\n", expectCond, cond)
b.Fatalf("should be %s but %s\n", expectCond, cond)
}
}
})
Expand Down

0 comments on commit 0b7f991

Please sign in to comment.