Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanel committed Feb 19, 2024
1 parent 6cba1ac commit 4a0cbab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions unfair/scripts/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def parse_opened_exp(

# Normalize the packet arrival times to the start of the experiment.
earliest_start_time_us = min(
pkts[features.ARRIVAL_TIME_FET][-1] for pkts in flw_to_pkts.values()
pkts[features.ARRIVAL_TIME_FET][0] for pkts in flw_to_pkts.values()
)
for flw in flw_to_pkts:
flw_to_pkts[flw][features.ARRIVAL_TIME_FET] -= earliest_start_time_us
Expand Down Expand Up @@ -534,6 +534,8 @@ def parse_opened_exp(
earliest_end_time_us = min(
pkts[features.ARRIVAL_TIME_FET][-1] for pkts in flw_to_pkts.values()
)
print("latest_start_time_us", latest_start_time_us)
print("earliest_end_time_us", earliest_end_time_us)
flw_to_pkts = utils.trim_packets(
flw_to_pkts, latest_start_time_us, earliest_end_time_us
)
Expand Down Expand Up @@ -676,7 +678,7 @@ def calculate_maxmin_ratios(params, flw_to_pkts, flw_to_sender, sender_to_flws):
smaller_maxmin_rate_bps = maxmin_rates_bps[smaller_idx]

# Look up the sender with the larger maxmin rate.
larger_idx = np.argmin(maxmin_rates_bps)
larger_idx = np.argmax(maxmin_rates_bps)
larger_sender = senders[larger_idx]
# Note that this is per-flow.
larger_maxmin_rate_bps = maxmin_rates_bps[larger_idx]
Expand Down

0 comments on commit 4a0cbab

Please sign in to comment.