Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_dtrace.cpython-311.pyc |
�
�Ke � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dl
mZ e j s ej
d� � �d� Zd� Z G d� d� � Z G d � d
e� � Z G d� de� � Z G d
� d� � Z G d� deej � � Z G d� deej � � Z G d� deej � � Z G d� deej � � Zedk r ej � � dS dS )� N)�support)�findfileztest module requires subprocessc �^ � t j � t | d�� � � � S )N�
dtracedata)�subdir)�os�path�abspathr )�filenames �:/usr/local/apps/python3/lib/python3.11/test/test_dtrace.pyr
r
s# � �
�7�?�?�8�H�\�B�B�B�C�C�C� c �J � t j dd| � � } d� | � � � D � � }|� d� �� � d� |D � � }d� |� � S # t
t f$ r# t d� | � � � � �w xY w) aM Normalize DTrace output for comparison.
DTrace keeps a per-CPU buffer, and when showing the fired probes, buffers
are concatenated. So if the operating system moves our thread around, the
straight result can be "non-causal". So we add timestamps to the probe
firing, sort by that field, then strip it from the outputz\[[0-9]+ refs\]� c �f � g | ].}|�|� d � � �|� d� � ��/S )�#� )�
startswith�split��.0�rows r �
<listcomp>z*normalize_trace_output.<locals>.<listcomp> sN � �
�
�
���
� �>�>�#�.�.�
��I�I�d�O�O�
�
�
r
c �, � t | d � � S )Nr )�int)r s r �<lambda>z(normalize_trace_output.<locals>.<lambda>% s � �C��A��K�K� r
)�keyc � � g | ]
}|d ��S )� � r s r r z*normalize_trace_output.<locals>.<listcomp>&