How to benchmark your Go code? ⚡
Go comes with a built-in benchmarking framework that gives you the ability to benchmark any code and it reports some interesting stats like
- function throughput
- per operation execution time
- number of allocations per operation
- total memory allocation per operation
I wrote a detailed post on Duggup about how to use this framework, benchmark the code, and a few tunable parameters.
Read it here - https://lnkd.in/gCnssyP9
This was Day #3 of the 30 days of Go challenge, so follow along my journey and share your learnings on Duggup - a no-nonsense social network for people in tech.
⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.
duggup.com/p/arpit