Skip to content

Commit

Permalink
Merge pull request #271 from lf-lang/fedsd-fix-self-id
Browse files Browse the repository at this point in the history
Fedsd fix self_id
  • Loading branch information
lhstrh authored Sep 16, 2023
2 parents 872be8e + 87e0dd6 commit bfae633
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions util/tracing/visualization/fedsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,12 @@ def load_and_process_csv_file(csv_file) :
# which boils up to having 'RTI' in the 'event' column
df = df[df['event'].str.contains('Sending|Receiving|Scheduler advancing time ends') == True]

# Fix the parameters of the event 'Scheduler advancing time ends'
# We rely on the fact that the first row of the csv file cannot be the end of advancing time
id = df.iloc[-1]['self_id']
# Determine the "self id" in the trace file based on the first 'Receiving' or 'Sending' message (or use -1, the id of the RTI, if there is none).
id = -1
for index, row in df.iterrows():
if ('Sending' in row['event'] or 'Receiving' in row['event']) :
id = row['self_id']
break
df['self_id'] = id
df = df.astype({'self_id': 'int', 'partner_id': 'int'})

Expand Down

0 comments on commit bfae633

Please # to comment.