GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit b8f1e5c2 authored by Karsten Loesing's avatar Karsten Loesing

Make some tweaks to new TGen model.

 - Change timeout back to 270 seconds and stallout back to 0 seconds.
 - Change initial pause to 300 seconds to keep default behavior
   unchanged.
 - Change model, so that pause_between starts in parallel to a stream,
   not when the stream is completed. This is the same behavior as
   before.

Also add a change log entry for all changes.
parent 1eea5e10
# Changes in version 0.7 - 2020-??-??
- Remove the `onionperf measure --oneshot` switch and replace it with
new switches `--tgen-pause-initial`, `--tgen-pause-between`,
`--tgen-transfer-size`, and `--tgen-num-transfers ` to further
configure the generated TGen model.
# Changes in version 0.6 - 2020-??-??
- Update to TGen 1.0.0, use TGenTools for parsing TGen log files, and
......
......@@ -43,8 +43,8 @@ class TGenLoadableModel(TGenModel):
class TGenModelConf(object):
"""Represents a TGen traffic model configuration."""
def __init__(self, pause_initial=0, num_transfers=1, transfer_size="5 MiB",
continuous_transfers=False, pause_between=5, port=None, servers=[],
def __init__(self, pause_initial=300, num_transfers=1, transfer_size="5 MiB",
continuous_transfers=False, pause_between=300, port=None, servers=[],
socks_port=None):
self.pause_initial = pause_initial
self.pause_between = pause_between
......@@ -103,28 +103,24 @@ class TorperfModel(GeneratableTGenModel):
g.add_node("stream",
sendsize="0",
recvsize=self.config.transfer_size,
timeout="15 seconds",
stallout="10 seconds")
timeout="270 seconds",
stallout="0 seconds")
g.add_node("pause_between",
time="%d seconds" % self.config.pause_between)
g.add_edge("start", "pause_initial")
g.add_edge("pause_initial", "stream")
g.add_edge("pause_initial", "pause_between")
g.add_edge("pause_between", "stream")
g.add_edge("pause_between", "pause_between")
# only add an end node if we need to stop
if self.config.continuous_transfers:
# continuous mode, i.e., no end node
g.add_edge("stream", "pause_between")
else:
if not self.config.continuous_transfers:
# one-shot mode, i.e., end after configured number of transfers
g.add_node("end",
count="%d" % self.config.num_transfers)
# check for end condition after every transfer
g.add_edge("stream", "end")
# if end condition not met, pause
g.add_edge("end", "pause_between")
g.add_edge("pause_between", "stream")
return g
......
......@@ -194,7 +194,7 @@ def main():
help="""the number of seconds TGen should wait before walking through its action graph""",
metavar="N", type=int,
action="store", dest="tgenpauseinitial",
default=5)
default=300)
measure_parser.add_argument('--tgen-pause-between',
help="""the number of seconds TGen should wait in between two transfers""",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment