MCPcopy Create free account
hub / github.com/arnauddri/algorithms / benchmarkBubbleSort

Function benchmarkBubbleSort

algorithms/sorting/bubble-sort/bubble_test.go:22–27  ·  view source on GitHub ↗
(n int, b *testing.B)

Source from the content-addressed store, hash-verified

20}
21
22func benchmarkBubbleSort(n int, b *testing.B) {
23 list := utils.GetArrayOfSize(n)
24 for i := 0; i < b.N; i++ {
25 sort(list)
26 }
27}
28
29func BenchmarkBubbleSort100(b *testing.B) { benchmarkBubbleSort(100, b) }
30func BenchmarkBubbleSort1000(b *testing.B) { benchmarkBubbleSort(1000, b) }

Callers 4

BenchmarkBubbleSort100Function · 0.85
BenchmarkBubbleSort1000Function · 0.85
BenchmarkBubbleSort10000Function · 0.85

Calls 1

sortFunction · 0.70

Tested by

no test coverage detected