summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_registry.py25
-rw-r--r--benchmark/tb_combiner_array.py (renamed from benchmark/tb_many_1_to_1_blocks.py)0
-rw-r--r--benchmark/tb_linear_chain.py27
3 files changed, 46 insertions, 6 deletions
diff --git a/benchmark/bm_registry.py b/benchmark/bm_registry.py
index af79a50..da7efe4 100644
--- a/benchmark/bm_registry.py
+++ b/benchmark/bm_registry.py
@@ -20,15 +20,27 @@ GR_ENV = {
'PYTHONPATH': os.path.join(INSTALL_PREFIX, 'gr/lib/python2.7/dist-packages:%s'%os.getenv('PYTHONPATH')),
}
-BENCHMARK_MANY_11_BLOCKS = tokwargs(
- wat='Benchmark the schedulers with many 1:1 ratio blocks',
+BENCHMARK_LINEAR_CHAIN = tokwargs(
+ wat='Benchmark the schedulers with linear chain topology',
moar='''\
-- Compare simultaneous 1:1 ratio blocks in each scheduler.
+- Topology is a linear chain of one input/one output blocks.
- GRAS will use only the buffer pool allocator,
and every work will fully consume available buffers.''',
tests = [
- tokwargs(wat='GRAS', args=['tb_many_1_to_1_blocks.py', DURATION], env=GRAS_ENV, expand=True),
- tokwargs(wat='GRSS', args=['tb_many_1_to_1_blocks.py', DURATION], env=GR_ENV),
+ tokwargs(wat='GRAS', args=['tb_linear_chain.py', DURATION], env=GRAS_ENV, expand=True),
+ tokwargs(wat='GRSS', args=['tb_linear_chain.py', DURATION], env=GR_ENV),
+ ],
+)
+
+BENCHMARK_COMBINER_ARRAY = tokwargs(
+ wat='Benchmark the schedulers with combiner array topology',
+ moar='''\
+- Topology is a tower of two input math blocks.
+- GRAS will use only the buffer pool allocator,
+and every work will fully consume available buffers.''',
+ tests = [
+ tokwargs(wat='GRAS', args=['tb_combiner_array.py', DURATION], env=GRAS_ENV, expand=True),
+ tokwargs(wat='GRSS', args=['tb_combiner_array.py', DURATION], env=GR_ENV),
],
)
@@ -107,7 +119,8 @@ BENCHMARK_DELAY_BLOCKS = tokwargs(
)
BENCHMARKS = (
- BENCHMARK_MANY_11_BLOCKS,
+ BENCHMARK_LINEAR_CHAIN,
+ BENCHMARK_COMBINER_ARRAY,
BENCHMARK_MANY_RATE_BLOCKS,
BENCHMARK_DFIR_BLOCK,
BENCHMARK_RESAMP_BLOCK,
diff --git a/benchmark/tb_many_1_to_1_blocks.py b/benchmark/tb_combiner_array.py
index c545d7e..c545d7e 100644
--- a/benchmark/tb_many_1_to_1_blocks.py
+++ b/benchmark/tb_combiner_array.py
diff --git a/benchmark/tb_linear_chain.py b/benchmark/tb_linear_chain.py
new file mode 100644
index 0000000..184b6e1
--- /dev/null
+++ b/benchmark/tb_linear_chain.py
@@ -0,0 +1,27 @@
+import gnuradio
+from gnuradio import gr
+from gnuradio import blocks as grblocks
+import sys
+
+if __name__ == '__main__':
+
+ duration = float(sys.argv[1])
+
+ tb = gr.top_block()
+ src = gr.null_source(8)
+ b0 = gr.copy(8)
+ b1 = grblocks.sub_cc()
+ b2 = gr.copy(8)
+ b3 = grblocks.divide_cc()
+ b4 = gr.copy(8)
+ sink = gr.null_sink(8)
+
+ tb.connect(src, b0, b1, b2, b3, b4, sink)
+
+ import time
+ tb.start()
+ time.sleep(duration)
+ print '##RESULT##', sink.nitems_read(0)/duration
+ import sys; sys.stdout.flush()
+ tb.stop()
+ tb.wait()