@@ -843,27 +843,26 @@ def _hierarchical_sub(self, tmp_hierarchical_list, event, per_period_stats,
843
843
844
844
# Recursively iterate over all the children of this period
845
845
for child in event .children :
846
+ if not self ._filter_event_duration (child ):
847
+ continue
846
848
if child .name not in per_period_stats .keys ():
847
849
per_period_stats [child .name ] = _AggregatedPeriodStats (
848
850
self ._analysis_conf .period_def_registry ,
849
851
child .name )
850
852
active_periods [event ].add_child (child .name , child .duration )
851
853
active_periods [child ] = _TmpAggregation (active_periods [event ])
852
- # print('passing', ancestors_captures + event_captures)
853
854
child_captures = self ._hierarchical_sub (
854
855
tmp_hierarchical_list , child , per_period_stats ,
855
856
per_parent_period_group_by_stats , active_periods ,
856
857
ancestors_captures + event_captures ,
857
858
per_group_active_periods , per_period_group_by_stats )
858
859
del (active_periods [child ])
859
- # print('returned', child_captures)
860
860
for c in child_captures :
861
861
local_captures .append (event_captures + c )
862
862
global_captures .append (event_captures .copy () + c )
863
863
if len (local_captures ) == 0 :
864
864
local_captures = [event_captures ]
865
865
global_captures = [event_captures .copy ()]
866
- # print('in', event.name, 'local + children', local_captures)
867
866
full_captures = []
868
867
for c in global_captures :
869
868
tmp_c = c .copy ()
@@ -872,7 +871,6 @@ def _hierarchical_sub(self, tmp_hierarchical_list, event, per_period_stats,
872
871
# dedup
873
872
if tmp_c not in full_captures :
874
873
full_captures .append (tmp_c )
875
- # print('in2', event.name, full_captures)
876
874
active_periods [event ].capture_groups = full_captures
877
875
878
876
self ._account_parents_in_group (event , full_captures ,
@@ -905,6 +903,8 @@ def _get_aggregated_lists(self):
905
903
active_periods = {}
906
904
per_group_active_periods = {}
907
905
for period_event in self ._analysis .all_period_list :
906
+ if not self ._filter_event_duration (period_event ):
907
+ continue
908
908
if self ._analysis_conf ._order_by == "hierarchy" or \
909
909
self ._args .stats or self ._args .freq :
910
910
# Only top-level events to start the recursive iteration
@@ -929,14 +929,14 @@ def _get_aggregated_lists(self):
929
929
930
930
if period_event .name != self ._analysis_conf ._aggregate_by :
931
931
continue
932
- if not self ._filter_event_duration (period_event ):
933
- continue
934
932
if period_event not in parent_aggregated_dict .keys ():
935
933
parent_aggregated_dict [period_event ] = {}
936
934
# Associate the periods with their full capture list (each period
937
935
# sees its own capture and the capture of all its children)
938
936
tmp_list = []
939
937
for child in period_event .children :
938
+ if not self ._filter_event_duration (child .duration ):
939
+ continue
940
940
self ._find_aggregated_subperiods (
941
941
period_event ,
942
942
child , tmp_list ,
@@ -1398,6 +1398,8 @@ def _get_per_period_stats_result_table(self, begin_ns, end_ns,
1398
1398
min , max , count , avg , total , period_list = \
1399
1399
self ._get_filtered_min_max_count_avg_total_flist (
1400
1400
period_stats .period_list )
1401
+ if count == 0 :
1402
+ continue
1401
1403
stdev = self ._compute_period_duration_stdev (period_list )
1402
1404
1403
1405
if math .isnan (stdev ):
0 commit comments