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

Function BenchmarkLinear

search/linear_test.go:19–25  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

17}
18
19func BenchmarkLinear(b *testing.B) {
20 testCase := generateBenchmarkTestCase()
21 b.ResetTimer() // exclude time taken to generate test case
22 for i := 0; i < b.N; i++ {
23 _, _ = Linear(testCase, i)
24 }
25}

Callers

nothing calls this directly

Calls 2

LinearFunction · 0.85

Tested by

no test coverage detected