Skip to content

Commit a71412e

Browse files
liuchaoxiaochaoren1
liuchao
authored andcommitted
Repair service ratio is negative
1 parent b1bd2f9 commit a71412e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/app/application/l7_flow_tracing.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,12 +1397,10 @@ def format_selftime(traces, parent_trace, child_ids, uid_index_map):
13971397
child_trace = traces[uid_index_map[child_id]]
13981398
child_self_time = child_trace["end_time_us"] - child_trace[
13991399
"start_time_us"]
1400-
if child_self_time > 0:
1400+
if child_self_time > 0 and child_self_time <= parent_trace["selftime"]:
14011401
parent_trace["selftime"] -= child_self_time
14021402
else:
1403-
new_child_ids = child_trace.get("childs", [])
1404-
return format_selftime(traces, parent_trace, new_child_ids,
1405-
uid_index_map)
1403+
return
14061404

14071405

14081406
def pruning_trace(response, _id, network_delay_us):

0 commit comments

Comments
 (0)