Skip to content

Commit 6872e7c

Browse files
committed
Fix plotting script
1 parent d2f2634 commit 6872e7c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Basic usage:
3333
* Use the if= argument to get Remy to read previous RemyCCs as the
3434
starting point for optimization.
3535

36-
* The `rat-runner` tool will execute saved RemyCCs. The filename
36+
* The `sender-runner` tool will execute saved RemyCCs. The filename
3737
should be set with a `if=` argument. It also accepts `link=` to set
3838
the link speed (in packets per millisecond), `rtt=` to set the RTT,
3939
and `nsrc=` to set the maximum degree of multiplexing.

scripts/plot.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/python3
2-
"""Runs rat-runner enough times to generate a plot, and plots the result.
2+
"""Runs sender-runner enough times to generate a plot, and plots the result.
33
This script requires Python 3."""
44

55
import sys
@@ -26,7 +26,7 @@
2626
HLINE1 = "-" * 80 + "\n"
2727
HLINE2 = "=" * 80 + "\n"
2828
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
29-
RATRUNNERCMD = os.path.join(ROOTDIR, "src", "rat-runner")
29+
RATRUNNERCMD = os.path.join(ROOTDIR, "src", "sender-runner")
3030
SENDER_REGEX = re.compile("^sender: \[tp=(-?\d+(?:\.\d+)?), del=(-?\d+(?:\.\d+)?)\]$", re.MULTILINE)
3131
NORM_SCORE_REGEX = re.compile("^normalized_score = (-?\d+(?:\.\d+)?)$", re.MULTILINE)
3232
LINK_PPT_PRIOR_REGEX = re.compile("^link_packets_per_ms\s+\{\n\s+low: (-?\d+(?:\.\d+)?)\n\s+high: (-?\d+(?:\.\d+)?)$", re.MULTILINE)
@@ -71,7 +71,7 @@ def run_command(command, show=True, writefile=None, includestderr=True):
7171
return output
7272

7373
def run_ratrunner(remyccfilename, parameters, console_file=None):
74-
"""Runs rat-runner with the given parameters and returns the result.
74+
"""Runs sender-runner with the given parameters and returns the result.
7575
`remyccfilename` is the name of the RemyCC to test.
7676
`parameters` is a dict of parameters.
7777
If `console_file` is specified, it must be a file object, and the output will be written to it."""
@@ -96,7 +96,7 @@ def run_ratrunner(remyccfilename, parameters, console_file=None):
9696
return run_command(command, show=False, writefile=console_file, includestderr=True)
9797

9898
def parse_ratrunner_output(result):
99-
"""Parses the output of rat-runner to extract the normalized score, and
99+
"""Parses the output of sender-runner to extract the normalized score, and
100100
sender throughputs and delays. Returns a 3-tuple. The first element is the
101101
normalized score from the rat-runnner script. The second element is a list
102102
of lists, one list for each sender, each inner list having two elements,
@@ -121,7 +121,7 @@ def parse_ratrunner_output(result):
121121
raise RuntimeError("Found no or duplicate link packets per ms prior assumptions in this output.")
122122
link_ppt_prior = tuple(map(float, link_ppt_prior_matches[0]))
123123

124-
# Divide norm_score the number of senders (rat-runner returns the sum)
124+
# Divide norm_score the number of senders (sender-runner returns the sum)
125125
norm_score /= len(sender_data)
126126

127127
return norm_score, sender_data, link_ppt_prior
@@ -213,7 +213,7 @@ def get_link_ppt_priors(self):
213213

214214

215215
class RatRunnerFilesMixin:
216-
"""Provides functionality relating to rat-runner output files.
216+
"""Provides functionality relating to sender-runner output files.
217217
Subclass constructors must provide a `console_dir` attribute to objects of
218218
the class, which may be None."""
219219

@@ -225,11 +225,11 @@ def get_console_filename(self, remyccfilename, link_ppt):
225225

226226

227227
class RatRunnerRemyCCPerformancePlotGenerator(RatRunnerFilesMixin, BaseRemyCCPerformancePlotGenerator):
228-
"""Generates data and plots by invoking rat-runner to generate a score for
228+
"""Generates data and plots by invoking sender-runner to generate a score for
229229
every point. In addition to the arguments taken by BaseRemyCCPerformancePlotGenerator:
230230
231-
`parameters` is a dictionary of parameters to pass to rat-runner.
232-
`console_dir`, optional, is the directory to which rat-runner outputs will be written,
231+
`parameters` is a dictionary of parameters to pass to sender-runner.
232+
`console_dir`, optional, is the directory to which sender-runner outputs will be written,
233233
one file per data point.
234234
"""
235235

@@ -239,7 +239,7 @@ def __init__(self, link_ppt_range, parameters, **kwargs):
239239
super(RatRunnerRemyCCPerformancePlotGenerator, self).__init__(link_ppt_range, **kwargs)
240240

241241
def get_statistics(self, remyccfilename, link_ppt):
242-
"""Runs rat-runner on the given RemyCC `remyccfilename` and with the given
242+
"""Runs sender-runner on the given RemyCC `remyccfilename` and with the given
243243
parameters, and returns the normalized score and sender throughputs and delays.
244244
"""
245245
parameters = dict(self.parameters)

0 commit comments

Comments
 (0)