discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Profiling, stopping the flow graph


From: Dan Halperin
Subject: [Discuss-gnuradio] Profiling, stopping the flow graph
Date: Mon, 29 Jan 2007 10:35:33 -0800
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

Hi,

What options are there for profiling GNU Radio code? I've done some
Python profiling, and some C profiling, but what options are there for
this crazy SWIG-driven mix of the two?

Also, a flow graph question. In the main loop of the transmit path of my
benchmarking program, I have the following (hopefully self-explanatory
code):

        fg.start()

        self.num_to_send = options.packets
        self.bytes_per_packet = options.bytes
        util.rand_init(options.seed)

        for i in range(self.num_to_send):
            # generate random payload here into buf
            buf = util.random_bytes(self.bytes_per_packet)
            if i % 10 == 0:
                print "> sending packet #", i
            mac.send_buffer_unreliably(buf)
#            sleep(.01)

#        sleep (1)
#        sys.exit(0)

        fg.stop()     # tell flow graph to stop.
        fg.wait()     # wait for it to finish

If the sleep(.01) line is uncommented, then the flow graph does not
stop, and instead I quit using the sleep(1); sys.exit(0); however
everything works fine with no sleeping. What could be causing this? Is
it something weird involving code running in the same thread that
shouldn't be?

Thanks,

Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]