blob: e7ed6f96f8e776bb3303303776080a5b58345ac7 [file] [log] [blame]
Alexander Lane1bc9b472018-05-16 15:07:16 -05001from ndn.experiments.experiment import Experiment
2
3class ArgumentsExperiment(Experiment):
4 def __init__(self, args):
5 Experiment.__init__(self, args)
6 self.ds = self.arguments.ds
7 self.logging = self.arguments.logging
8
9 def setup(self):
10 pass
11
12 def run(self):
13 print("Argument ds: {}".format(self.ds))
14 print("Argument logging: {}".format(self.logging))
15
16 @staticmethod
17 def parseArguments(parser):
18 parser.add_argument("--ds", dest="ds", default="1000",
19 help="[Arguments Experiment] Number of data streams")
20 parser.add_argument("--logging", dest="logging", action="store_true",
21 help="[Arguments Experiment] Enable logging")
22
23Experiment.register("args-exp", ArgumentsExperiment)