Some code to get statistics out of trace file.