Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Nov 7, 2024
2 parents eae0641 + 91493fd commit c0e3368
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
18 changes: 11 additions & 7 deletions modules/fastclick-play-single-mt.npf
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,15 @@ ig :: Script(TYPE ACTIVE,
set sent $(avgSIN.add count),
set bytessent $(avgSIN.add byte_count),
set bytes $(RIN/avg.add byte_count),
print "IG-$t-RESULT-${PREFIX}IGCOUNT $(sub $count $lastcount)",
print "IG-$t-RESULT-${PREFIX}IGSENT $(sub $sent $lastsent)",
print "IG-$t-RESULT-${PREFIX}IGBYTESSENT $(sub $bytessent $lastbytessent)",
set drop $(sub $sent $count),
print "IG-$t-RESULT-${PREFIX}IGDROPPED $(sub $drop $lastdrop)",
set lastdrop $drop,
{% if GEN_RX %}
print "IG-$t-RESULT-${PREFIX}IGCOUNT $(sub $count $lastcount)",
print "IG-$t-RESULT-${PREFIX}IGDROPPED $(sub $drop $lastdrop)",
print "IG-$t-RESULT-${PREFIX}IGTHROUGHPUT $(div $(mul $(add $(mul $(sub $count $lastcount) 24) $(sub $bytes $lastbytes)) 8) $elapsed)",
{% endif %}
goto next $(eq $DOLAT 0),
// print "IG-$t-RESULT-${PREFIX}ILAT01 $(RIN/tsd0.perc01 $indexA)",
// print "IG-$t-RESULT-${PREFIX}ILAT50 $(RIN/tsd0.median $indexA)",
Expand Down Expand Up @@ -382,20 +384,22 @@ dm :: DriverManager( print "Waiting ${GEN_START_DELAY} seconds before launching
goto perc $(le $i 100.0),
label alatval,
print "RESULT-${PREFIX}TESTTIME $(sub $stoptime $starttime)",
print "RESULT-${PREFIX}RCVTIME $(RIN/avg.avg time)",
print "RESULT-${PREFIX}THROUGHPUT $(RIN/avg.add link_rate)",
set sent $(avgSIN.add count),
set count $(RIN/avg.add count),
set bytes $(RIN/avg.add byte_count),
{% if GEN_RX %}
print "RESULT-${PREFIX}RCVTIME $(RIN/avg.avg time)",
print "RESULT-${PREFIX}THROUGHPUT $(RIN/avg.add link_rate)",
print "RESULT-${PREFIX}COUNT $count",
print "RESULT-${PREFIX}BYTES $bytes",
print "RESULT-${PREFIX}SENT $sent",
print "RESULT-${PREFIX}DROPPED $(sub $sent $count)",
print "RESULT-${PREFIX}DROPPEDPC $(div $(sub $sent $count) $sent)",
// print "RESULT-${PREFIX}DROPPEDPS $(div $(sub $sent $count) $(RIN/avg.avg time))",
print "RESULT-${PREFIX}DROPPEDPS $(div $(sub $sent $count) $(RIN/avg.avg time))",
print "RESULT-${PREFIX}PPS $(RIN/avg.add rate)",
{% endif %}
print "RESULT-${PREFIX}SENT $sent",
print "RESULT-${PREFIX}TX $(avgSIN.add link_rate)",
print "RESULT-${PREFIX}TXPPS $(avgSIN.add rate)",
print "RESULT-${PREFIX}PPS $(RIN/avg.add rate)",
print "EVENT GEN_POST",
stop);

Expand Down
2 changes: 1 addition & 1 deletion modules/fastclick-replay-single-mt.npf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ elementclass Numberise { $magic |
}

elementclass NoNumberise { $magic |
input-> Strip(14) -> check :: CheckIPHeader(CHECKSUM false) -> Unstrip(14) -> output
input-> MarkIPHeader(OFFSET 14) -> output
}

fdIN
Expand Down
11 changes: 9 additions & 2 deletions npf/expdesign/zltexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def need_run_for(self, next_val):

def ensure_monotonic(self, max_r, vals_for_current):

if not self.monotonic:
if not self.monotonic and max_r < max(self.executable_values):
# If the function is not monotonic, we now have to try rates between the max acceptable and the first dropping rate
after_max = next(iter(filter(lambda x : x > max_r, self.executable_values)))
if after_max not in vals_for_current:
Expand Down Expand Up @@ -93,6 +93,8 @@ def __next__(self):
# get all outputs for all inputs
vals_for_current = {}
acceptable_rates = []

# max_r is the maximal rate (tried or not) that we tried but still dropped some packets
max_r = max(self.executable_values)
for r, vals in self.results.items():
if Run(self.current).inside(r):
Expand Down Expand Up @@ -124,7 +126,12 @@ def __next__(self):

#Step 2 : go for the rate below the output of the max input
maybe_achievable_inputs = list(filter(lambda x : x <= max_r, self.executable_values))
next_val = max(maybe_achievable_inputs)
if len(maybe_achievable_inputs) == 0:
print(f"WARNING: No achievable for {self.input}! Tried {max_r} and it did not work.")
self.current = None
return self.__next__()
else:
next_val = max(maybe_achievable_inputs)
else:

maybe_achievable_inputs = list(filter(lambda x : x <= max_r*self.margin, self.executable_values))
Expand Down
Empty file added npf/output/notebook/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion npf/output/notebook/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def has_tag(cell, tag: str) -> bool:
return tag in tags or "all" in tags


def get_name(var, var_names: dict[str, str]):
def get_name(var, var_names):
"""Returns the name associated with a variable or a list of variables."""
if isinstance(var, list):
return [get_name(v, var_names) for v in var]
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'ordered_set; python_version >= "3.7.0"',
'paramiko',
'asteval',
'cryptography==42.0.4',
'cryptography==43.0.1',
'gitdb',
'pyasn1',
'natsort',
Expand All @@ -35,6 +35,8 @@
'spellwise',
'seaborn',
'statsmodels',
'scikit-optimize',
'colorama',
'scikit-optimize'
]

Expand Down

0 comments on commit c0e3368

Please sign in to comment.