Smarkets fork of a port of Andy Wingo's statprof.py to newer python by Alex Fraser