Skip to content

Commit

Permalink
test: add benchmark run for differ.diff method only
Browse files Browse the repository at this point in the history
  • Loading branch information
wI2L committed Mar 26, 2022
1 parent b393df1 commit 5aa8829
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,14 @@ func BenchmarkCompare(b *testing.B) {
_ = patch
}
})
b.Run("differ_diff/"+bb.name, func(b *testing.B) {
for i := 0; i < b.N; i++ {
d := differ{}
for _, opt := range bb.opts {
opt(&d)
}
d.diff(before, after)
}
})
}
}

0 comments on commit 5aa8829

Please sign in to comment.