|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/sqlalchemy/testing/ |
Upload File : |
�
���\c @ 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 m Z d d l m Z d d l m
Z
d d l m Z d d l m Z d d
l m
Z
y d d l Z Wn e k
r� d Z n Xd Z d Z d e f d � � YZ d
d � Z e j d
d � � Z d S( s� Profiling support for unit and performance tests.
These are special purpose profiling methods which operate
in a more fine-grained way than nose's profiling plugin.
i����Ni ( t config( t
gc_collecti ( t jython( t pypy( t update_wrapper( t win32t ProfileStatsFilec B s\ e Z d Z d � Z e d � � Z d � Z d � Z d � Z d � Z d � Z
d � Z RS( s� "Store per-platform/fn profiling results in a file.
We're still targeting Py2.5, 2.4 on 0.7 with no dependencies,
so no json lib :( need to roll something silly
c C s� t j d k o t j j | _ | j p? t j d k o? t j j | _ t j j | � | _
t j j | j
� d | _ t
j d � � | _ | j � | j r� | j � n d S( Ni����c S s
t j t � S( N( t collectionst defaultdictt dict( ( ( sB /usr/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt <lambda>: s ( R t optionst Nonet force_write_profilest force_writet write_profilest writet ost patht abspatht fnamet splitt short_fnameR R t datat _readt _write( t selft filename( ( sB /usr/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt __init__0 s
c C s� t j j d t j j } d j g t j d d !D] } t | � ^ q1 � } | g } | j | � t rx | j d � n t
r� | j d � n t r� | j d � n | j t j j j
r� d n d � t j j � } | j | r� d
p� d � d j | � S( Nt _t .i i R R t wint
nativeunicodet dbapiunicodet cextensionst
nocextensions( R t dbt namet drivert joint syst version_infot strt appendR R R t dialectt convert_unicodet requirementst _has_cextensions( R t dbapi_keyt vt
py_versiont platform_tokenst _has_cext( ( sB /usr/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt platform_keyB s 2
c C s) t } | | j k o( | j | j | k S( N( t
_current_testR R5 ( R t test_key( ( sB /usr/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyt has_stats[ s c C s� t } | j | } | | j } d | k r= g | d <} n
| d } d | k rd d | d <} n
| d } t | � | k } | s� | j | � | j r� | j � n d } n | d | | f } | d c d 7<| S( Nt countst
current_counti t linenoi ( R6 R R5 t lenR+ R R R ( R t callcountR7 t per_fnt per_platformR9 R: t has_countt result( ( sB /usr/lib64/python2.7/site-packages/sqlalchemy/testing/profiling.pyRA a s$
c C s{ t } | j | } | | j } | d } | d } | t | � k rW | | | d <n
| | d <| j rw | j � n d S( NR9 R: i i����( R6 R R5 R<