@staticmethod<EOL><INDENT>def _transform_stats(prof):<DEDENT>
records = []<EOL>for info, params in prof.stats.items():<EOL><INDENT>filename, lineno, funcname = info<EOL>cum_calls, num_calls, time_per_call, cum_time, _ = params<EOL>if prof.total_tt == <NUM_LIT:0>:<EOL><INDENT>percentage = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>percentage = round(<NUM_LIT:100> * (cum_time / prof.total_tt), <NUM_LIT:4>)<EOL><DEDENT>cum_time = round(cum_time, <NUM_LIT:4>)<EOL>func_name = '<STR_LIT>' % (funcname, filename)<EOL>color_hash = base_profiler.hash_name(func_name)<EOL>records.append(<EOL>(filename, lineno, funcname, cum_time, percentage, num_calls,<EOL>cum_calls, time_per_call, filename, color_hash))<EOL><DEDENT>return sorted(records, key=operator.itemgetter(<NUM_LIT:4>), reverse=True)<EOL>
Processes collected stats for UI.