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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How we run benchmarks in go

A

Running the next command in the project root go test -bench=.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly