That build log for CockroachDB takes a lot longer than a normal build, because it's generating releasable artifacts for multiple platforms, which means running the entire build process multiple times. Also, the build time is dominated by a few vendored C++ dependencies (mainly libprotobuf and libsnappy) which are built using CMake.
On my system, building just the Go code for the latest version of CockroachDB (about 360kloc) takes 24 seconds.
A quick glance seems to indicate that cockroachdb takes about 9 minutes [1] and infuxdb about 15 minutes [2]
[1] https://teamcity.cockroachdb.com/viewLog.html?buildId=380603...
[2] https://circleci.com/gh/influxdata/influxdb/tree/master