Currently if sccache determines it can't cache a compile it will log that info and the client will run the compiler, but it's not surfaced outside of the logs anywhere. It would be nice if we saved this info and exposed it somewhere user-visible. Including it in the output of --show-stats is probably sensible. There's an existing TODO on this in the code.
The simplest thing to do would be to maintain a HashMap<&'static str, int> (probably in the ServerStats struct) and do like:
CompilerArguments::CannotCache(why) => {
*stats.not_cached.entry(why).or_insert(0) += 1
}
Then add some code to print the contents of the HashMap in ServerStats::print.