You can specify the number of iterations for benchmarking using the _______ flag.

  • -bench
  • -count
  • -iterations
  • -n
The correct answer is "-n". In Go, when executing benchmarks, the -n flag is used to specify the number of iterations for benchmarking. This flag allows developers to control the duration and accuracy of benchmarking tests by adjusting the number of iterations performed. By tweaking this parameter, developers can obtain more precise performance measurements for their code.
Add your answer
Loading...

Leave a comment

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