Skip to content

Instantly share code, notes, and snippets.

@jnm
Created May 6, 2014 02:15
Show Gist options
  • Save jnm/3f932b1cbbaf90557482 to your computer and use it in GitHub Desktop.
Save jnm/3f932b1cbbaf90557482 to your computer and use it in GitHub Desktop.
line_profiler thing
def get_report(self, report_view, context):
import line_profiler
profiler = line_profiler.LineProfiler()
profiler.add_function(self.arse_get_report)
profiler.enable_by_count()
out = self.arse_get_report(report_view, context)
profiler.print_stats()
return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment