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

Function generateBenchmarkTestCase

search/testcases.go:61–67  ·  view source on GitHub ↗

This function generate consistent testcase for benchmark test.

()

Source from the content-addressed store, hash-verified

59
60// This function generate consistent testcase for benchmark test.
61func generateBenchmarkTestCase() []int {
62 var testCase []int
63 for i := 0; i < 1000; i++ {
64 testCase = append(testCase, i)
65 }
66 return testCase
67}

Callers 9

BenchmarkInterpolationFunction · 0.85
BenchmarkJump2Function · 0.85
BenchmarkJumpFunction · 0.85
BenchmarkBinaryFunction · 0.85
BenchmarkBinaryIterativeFunction · 0.85
BenchmarkLowerBoundFunction · 0.85
BenchmarkUpperBoundFunction · 0.85
BenchmarkLinearFunction · 0.85
BenchmarkSelectKFunction · 0.85

Calls

no outgoing calls

Tested by 9

BenchmarkInterpolationFunction · 0.68
BenchmarkJump2Function · 0.68
BenchmarkJumpFunction · 0.68
BenchmarkBinaryFunction · 0.68
BenchmarkBinaryIterativeFunction · 0.68
BenchmarkLowerBoundFunction · 0.68
BenchmarkUpperBoundFunction · 0.68
BenchmarkLinearFunction · 0.68
BenchmarkSelectKFunction · 0.68