File: //opt/alt/python27/lib/python2.7/site-packages/paste/debug/profile.pyo
�
a�Nc           @   s�   d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m	 Z	 d d l
 m Z d d g Z d e
 f d �  �  YZ d �  Z d	 �  Z d
 e
 f d �  �  YZ d d
 d � Z d S(   se   
Middleware that profiles the request and displays profiling
information at the bottom of each page.
i����N(   t   StringIO(   t   responset   ProfileMiddlewaret   profile_decoratorc           B   s/   e  Z d  Z d Z d d d d � Z d �  Z RS(   s�  
    Middleware that profiles all requests.
    All HTML pages will have profiling information appended to them.
    The data is isolated to that single request, and does not include
    data from previous requests.
    This uses the ``hotshot`` module, which affects performance of the
    application.  It also runs in a single-threaded mode, so it is
    only usable in development environments.
    sW   clear: both; background-color: #ff9; color: #000; border: 2px solid #000; padding: 5px;s   profile.log.tmpi(   c         C   s.   | |  _  t j �  |  _ | |  _ | |  _ d  S(   N(   t   appt	   threadingt   Lockt   lockt   log_filenamet   limit(   t   selfR   t   global_confR   R	   (    (    sD   /opt/alt/python27/lib/python2.7/site-packages/paste/debug/profile.pyt   __init__&