From c54a7bc71614df230a9848af22b3c3842166d77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Miri=C4=87?= Date: Mon, 2 Mar 2020 11:57:12 +0100 Subject: [PATCH] Add ExecutionSegment.Scale benchmark --- lib/execution_segment_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/execution_segment_test.go b/lib/execution_segment_test.go index a8534338b48..903e37d36dc 100644 --- a/lib/execution_segment_test.go +++ b/lib/execution_segment_test.go @@ -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())