[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] determining throughput
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] determining throughput |
Date: |
Thu, 23 Jun 2005 14:00:17 -0700 |
User-agent: |
Mutt/1.5.6i |
On Wed, Jun 22, 2005 at 05:25:12PM -0400, John M Daniel wrote:
> Hello,
>
> I am trying to determine what the throughput is with my
> configuration. I am trying to accomplish this by inputting
> a sinusoid and writing it to a file. Having never dealt with
> binary files, I am now stuck on reading in values from this
> file to see if there are any discontinuities. Below is my
> attempt at trying to read in the values (pretty much copied from the
> gr_file_source.cc) which gives a segfault. Once I can read in and
> access the values I plan to check them for continuity in chunks.
> Pointers on whether or not this is the right approach or
> if there is a much simpler answer to my question would be
> greatly appreciated. Thanks and let me know if there is any
> information that would help you help me ; )
>
If your preferred hammer is Octave or Matlab, you might want to try
importing them using
gnruadio-core/src/utils/read_{float,complex,int,short}_binary.m
I not sure I'm following your question. Are you trying to benchmark
the throughput of a particular graph in gnuradio? What are the input
and output sources? Files? USRP?
If they are files, the simplest thing is to set up a flow graph with a
file source on one end, a file sink on the other and the rest of your
signal processing in the middle. Then use fg.run() to run the graph
until it completes.
Something like this:
#!/usr/bin/env python
# my_benchmark.py
from gnuradio import gr
def build_graph():
fg = gr.flow_graph()
src = gr.file_source(gr.sizeof_float, "input.dat")
# your stuff here...
dst = gr.file_sink(gr.sizeof_float, "output.dat")
fg.connect(src, dst)
return fg
if __name__ == '__main__':
fg = build_graph()
fg.run()
Then:
$ time ./my_benchmark.py
Depending on what you're doing in the middle you may be measuring your
system i/o performance, not GNU Radio's performance.
If you don't care about the output, use a gr.null_sink(gr.sizeof_float)
Eric