MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkSelectK

Function BenchmarkSelectK

search/selectk_test.go:33–41  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

31}
32
33func BenchmarkSelectK(b *testing.B) {
34 testCase := generateBenchmarkTestCase()
35 testCase = append(testCase, 1) // make sure len(testCase)/2+1 is valid
36 b.ResetTimer()
37
38 for i := 0; i < b.N; i++ {
39 _, _ = SelectK(testCase, len(testCase)/2)
40 }
41}

Callers

nothing calls this directly

Calls 2

SelectKFunction · 0.85

Tested by

no test coverage detected