X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fexamples%2Fprofiling.py;h=daac301fae3fee2cb55b79b44a6c423917385bb2;hb=2dc3217bc7b2c60c511cb621fd4a77ec50265a6e;hp=ec743e1259b5f843b06fc57b7f5022ac2a8c112f;hpb=bea3a10529b5a10509e4573fdda4573e56b773e0;p=osm%2Fvim-emu.git diff --git a/src/emuvim/examples/profiling.py b/src/emuvim/examples/profiling.py index ec743e1..daac301 100644 --- a/src/emuvim/examples/profiling.py +++ b/src/emuvim/examples/profiling.py @@ -36,6 +36,7 @@ from emuvim.dcemulator.net import DCNetwork from emuvim.api.rest.rest_api_endpoint import RestApiEndpoint from emuvim.api.sonata import SonataDummyGatekeeperEndpoint from mininet.node import RemoteController +from time import sleep import argparse import sys import signal @@ -66,6 +67,9 @@ class Profiling: stop_now = False + """ + Set up a simple topology and start it + """ def __init__(self): GracefulKiller(self) # create topology @@ -89,10 +93,13 @@ class Profiling: self.net.start() LOG.info("Started topology") while(not self.stop_now): - pass + sleep(1) self.net.stop() LOG.info("Stopped topology") + """ + Set stop value to stop the topology + """ def stop_it(self): self.stop_now = True