In Go, a benchmark function's name must start with ______.

  • "test"
  • "bench"
  • "benchmark"
  • "go"
In Go, a benchmark function's name must start with "Benchmark" followed by a capital letter. For example, if you're benchmarking a function named "MyFunction," the benchmark function's name would be "BenchmarkMyFunction." This naming convention is important for Go's testing and benchmarking tools to identify and execute benchmark functions correctly.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *