cmd/compilebench: generate separate cpu profiles when using -count

When the -count flag is provided,
instead of having each run overwrite the previous profile,
add a count suffix to the profile filename.
Then you can combine the profiles with

go tool pprof `go tool -n compile` <all profile files here>

This allows generation of precise profiles,
even for fast-compiling packages.

Change-Id: I006cf8fad143346b28a646a0b3582cc0f6eec310
Reviewed-by: Matthew Dempsky <>
1 file changed