Skip to content

Commit

Permalink
Add ExecutionSegment.Scale benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Mar 2, 2020
1 parent f3cfce0 commit c54a7bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/execution_segment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,14 @@ func TestExecutionSegmentScaleNoWobble(t *testing.T) {
}
}

func BenchmarkExecutionSegmentScale(b *testing.B) {
es, err := NewExecutionSegmentFromString("73/716:431/588")
require.NoError(b, err)
for n := 0; n < b.N; n++ {
es.Scale(5)
}
}

func TestMain(m *testing.M) {
rand.Seed(time.Now().UnixNano())
os.Exit(m.Run())
Expand Down

0 comments on commit c54a7bc

Please sign in to comment.