brown-gopher-background

Catching Slow Go Tests

The Problem Hello, in this short and sweet post, I will show a handy bash script to catch slow go tests based on their durations and their go cache status, but first we need to define the problem. Our current problem is when I run go test -v ./... we get simply huge output that is overwhelming with subtest outputs as well as t.Parallel pauses/continues. Plus, my inner OCD strikes when some things are always cached and some things are always not cached, I could never guess why and I never have time to look at plain log that has 1 million lines....

November 8, 2024 · 4 min · 656 words · Talha Altinel