
    gg                     h    S SK r S SKJrJr  \" S5      \" S5      \" S5      /rS rS rS rS	 rS
 r	g)    N)MetricRequestRequestedMetricsParsersmsp__pcsamp_sample_countsmsp__pcsamp_interval_cyclesgpc__cycles_elapsed.maxc                      g)NPCSamplingData r
       2nsight-compute-2025.1.1/sections/PCSamplingData.pyget_identifierr   #       r   c                      gNzPC sampling datar
   r
   r   r   get_namer   '       r   c                      gr   r
   r
   r   r   get_descriptionr   +   r   r   c                      g)NSourceCountersr
   r
   r   r   get_section_identifierr   /   r   r   c                    [         R                  " U 5      nUR                  S5      R                  S5      nUR	                  5       nUR                  5       [         R                  R                  :w  a  g [        X5      R                  [        5      nUS   R                  5       nUS   R                  5       nUS   R                  5       nUS:X  a8  SnXg:  a  US-  nUR                  [         R                  R                  US5        g g )Nr   r   r   r   zQSampling metrics were enabled, but no samples could be collected for this kernel.zDNote that the kernel duration is shorter than the sampling interval.z
No Samples)NvRulesget_contextrange_by_idxaction_by_idxfrontendworkload_typeIActionWorkloadType_KERNELr   parserequested_metricsvaluemessage	IFrontendMsgType_MSG_WARNING)	handlectxactionfemetricssample_countinterval_cycleskernel_durationr$   s	            r   applyr/   2   s    


f
%Ca ..q1F	B!D!DD$V4::;LMG67==?L<=CCEO78>>@Oqe-]]G


7$$88'<P r   )
r   RequestedMetricsr   r   r"   r   r   r   r   r/   r
   r   r   <module>r1      sL   2  B -.01+, Qr   