1
1
#!/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.
3
3
This script requires Python 3."""
4
4
5
5
import sys
26
26
HLINE1 = "-" * 80 + "\n "
27
27
HLINE2 = "=" * 80 + "\n "
28
28
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" )
30
30
SENDER_REGEX = re .compile ("^sender: \[tp=(-?\d+(?:\.\d+)?), del=(-?\d+(?:\.\d+)?)\]$" , re .MULTILINE )
31
31
NORM_SCORE_REGEX = re .compile ("^normalized_score = (-?\d+(?:\.\d+)?)$" , re .MULTILINE )
32
32
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):
71
71
return output
72
72
73
73
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.
75
75
`remyccfilename` is the name of the RemyCC to test.
76
76
`parameters` is a dict of parameters.
77
77
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):
96
96
return run_command (command , show = False , writefile = console_file , includestderr = True )
97
97
98
98
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
100
100
sender throughputs and delays. Returns a 3-tuple. The first element is the
101
101
normalized score from the rat-runnner script. The second element is a list
102
102
of lists, one list for each sender, each inner list having two elements,
@@ -121,7 +121,7 @@ def parse_ratrunner_output(result):
121
121
raise RuntimeError ("Found no or duplicate link packets per ms prior assumptions in this output." )
122
122
link_ppt_prior = tuple (map (float , link_ppt_prior_matches [0 ]))
123
123
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)
125
125
norm_score /= len (sender_data )
126
126
127
127
return norm_score , sender_data , link_ppt_prior
@@ -213,7 +213,7 @@ def get_link_ppt_priors(self):
213
213
214
214
215
215
class RatRunnerFilesMixin :
216
- """Provides functionality relating to rat -runner output files.
216
+ """Provides functionality relating to sender -runner output files.
217
217
Subclass constructors must provide a `console_dir` attribute to objects of
218
218
the class, which may be None."""
219
219
@@ -225,11 +225,11 @@ def get_console_filename(self, remyccfilename, link_ppt):
225
225
226
226
227
227
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
229
229
every point. In addition to the arguments taken by BaseRemyCCPerformancePlotGenerator:
230
230
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,
233
233
one file per data point.
234
234
"""
235
235
@@ -239,7 +239,7 @@ def __init__(self, link_ppt_range, parameters, **kwargs):
239
239
super (RatRunnerRemyCCPerformancePlotGenerator , self ).__init__ (link_ppt_range , ** kwargs )
240
240
241
241
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
243
243
parameters, and returns the normalized score and sender throughputs and delays.
244
244
"""
245
245
parameters = dict (self .parameters )
0 commit comments