{% extends 'silk/templates/silk/base/root_base.html' %} {% load inclusion %} {% block menu %} {% root_menu request %} {% endblock %} {% block style %} {% endblock style %} {% block js %} {% endblock %} {% block data %}
Overview
Some content
Installation
Some content
Profiling
Some content
Dynamic Profiling

Dynamic profiling allows the injection of silk decorators and context managers into functions and methods at runtime. This allows for profiling of dependencies that we may not have write access to.

Dynamic function decoration:

SILKY_DYNAMIC_PROFILING = [{
    'module': 'path.to.module',
    'function': 'foo'
},{
    'module': 'path.to.module',
    'function': 'MyClass.bar'
}]

Dynamic context manager:

SILKY_DYNAMIC_PROFILING = [{
    'module': 'path.to.module',
    'function': 'foo',
    'start_line': 1,
    'end_line': 2,
}]
Configuration

You can configure Silky using your Django settings.py file. The individual items and defaults are described below:

# Print SQL queries to stdout as they are executed
# A list of dynamic profiling configurations, described in the 'Dynamic Profiling' section
SILKY_DYNAMIC_PROFILING = []
{% endblock %}