def profile_function(self):
prof = cProfile.Profile()<EOL>prof.enable()<EOL>result = self._run_object(*self._run_args, **self._run_kwargs)<EOL>prof.disable()<EOL>prof_stats = pstats.Stats(prof)<EOL>prof_stats.calc_callees()<EOL>return {<EOL>'<STR_LIT>': self._object_name,<EOL>'<STR_LIT>': self._transform_stats(prof_stats),<EOL>'<STR_LIT>': prof_stats.total_tt,<EOL>'<STR_LIT>': prof_stats.prim_calls,<EOL>'<STR_LIT>': prof_stats.total_calls,<EOL>'<STR_LIT:result>': result,<EOL>'<STR_LIT>': int(time.time())<EOL>}<EOL>
Runs cProfile on a function.