- Benchmarks nos permitem testar a velocidade ou performance do nosso código.
- Na prática:
- Arquivo: _test.go
- BET: Testes, Exemplos e...
- func BenchmarkFunc (b *testing.B) { ... b.N ... }
- go test -bench . ← todos
- go test -bench Func ← somente Func
- go help testflag
- Código: https://github.com/ellenkorbes/aprendago/tree/master/c%C3%B3digo/27_testes-e-benchmarking/benchtest
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.