Skip to content

Commit

Permalink
Small update in benchmark code
Browse files Browse the repository at this point in the history
  • Loading branch information
zaf committed Jan 21, 2017
1 parent 515098d commit 38a15db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ func TestParseRespomse(t *testing.T) {

// Benchmark AGI session initialisation
func BenchmarkParseEnv(b *testing.B) {
b.SetBytes(int64(len(env)))
b.ResetTimer()
for i := 0; i < b.N; i++ {
a := New()
a.Init(
Expand All @@ -252,6 +254,7 @@ func BenchmarkParseRes(b *testing.B) {
read := make([]byte, 0, len(repVal)+len(rep))
read = append(read, repVal...)
read = append(read, rep...)
b.SetBytes(int64(len(read)))
a := New()
b.ResetTimer()
for i := 0; i < b.N; i++ {
Expand Down

0 comments on commit 38a15db

Please sign in to comment.