Golang Flashcards
1
Q
In a benchmark what means b.N
?
A
b.N dictates how many times the benchmark will run the target code. It will vary b.N until the benchmark function lasts long enough to be timed reliably.
2
Q
How we run benchmarks in go
A
Running the next command in the project root go test -bench=.
3
Q
n a benchmark what means b.N
?
A
b.N
dictates how many times the benchmark will run the target code. It will vary b.N
until the benchmark function lasts long enough to be timed reliably.