ashu | 34c3ee0 | 2015-03-25 14:41:14 -0500 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | from ndn.experiments.experiment import Experiment |
| 4 | |
| 5 | import time |
| 6 | |
| 7 | class PingallExperiment(Experiment): |
| 8 | |
Vince Lehman | 3b8bc65 | 2015-06-18 15:01:47 -0500 | [diff] [blame] | 9 | def __init__(self, args): |
ashu | 34c3ee0 | 2015-03-25 14:41:14 -0500 | [diff] [blame] | 10 | |
Vince Lehman | 3b8bc65 | 2015-06-18 15:01:47 -0500 | [diff] [blame] | 11 | Experiment.__init__(self, args) |
ashu | 34c3ee0 | 2015-03-25 14:41:14 -0500 | [diff] [blame] | 12 | self.COLLECTION_PERIOD_BUFFER = 10 |
| 13 | |
| 14 | |
| 15 | def run(self): |
| 16 | self.startPings() |
| 17 | |
| 18 | # For pingall experiment sleep for the number of pings + some offset |
| 19 | time.sleep(self.nPings + self.COLLECTION_PERIOD_BUFFER) |
Vince Lehman | 3b8bc65 | 2015-06-18 15:01:47 -0500 | [diff] [blame] | 20 | |
| 21 | Experiment.register("pingall", PingallExperiment) |