diff options
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 10 | ||||
| -rw-r--r-- | example/example.db | bin | 55296 -> 55296 bytes | |||
| -rw-r--r-- | example/settings.py | 13 |
3 files changed, 14 insertions, 9 deletions
diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index af7137f..465a0a3 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -1,16 +1,10 @@ -import django -from django.conf import settings from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import mark_safe -import debug_toolbar from debug_toolbar.panels import DebugPanel -import sys import cProfile -from pstats import Stats, f8, func_std_string -from cStringIO import StringIO -from django.conf import settings +from pstats import Stats from colorsys import hsv_to_rgb class DjangoDebugToolbarStats(Stats): @@ -62,8 +56,6 @@ class FunctionCall(object): return name else: file_name, line_num, method = self.func - if file_name.startswith(settings.PROJECT_ROOT): - file_name='PROJECT' + file_name[len(settings.PROJECT_ROOT):] idx = file_name.find('/site-packages/') if idx > -1: file_name=file_name[idx+14:] diff --git a/example/example.db b/example/example.db Binary files differindex 7603a2d..ae455e3 100644 --- a/example/example.db +++ b/example/example.db diff --git a/example/settings.py b/example/settings.py index 06e153d..11b0117 100644 --- a/example/settings.py +++ b/example/settings.py @@ -32,3 +32,16 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ) TEMPLATE_DEBUG = DEBUG TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates')) +DEBUG_TOOLBAR_PANELS = ( + 'debug_toolbar.panels.version.VersionDebugPanel', + 'debug_toolbar.panels.timer.TimerDebugPanel', + 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', + 'debug_toolbar.panels.headers.HeaderDebugPanel', + 'debug_toolbar.panels.profiling.ProfilingDebugPanel', + 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', + 'debug_toolbar.panels.sql.SQLDebugPanel', + 'debug_toolbar.panels.template.TemplateDebugPanel', + #'debug_toolbar.panels.cache.CacheDebugPanel', + 'debug_toolbar.panels.signals.SignalDebugPanel', + 'debug_toolbar.panels.logger.LoggingPanel', +)
\ No newline at end of file |
