diff options
author | Josh Blum | 2013-01-31 11:56:57 -0800 |
---|---|---|
committer | Josh Blum | 2013-01-31 11:56:57 -0800 |
commit | 8242e504d5113a54010eb5863c01b0e0f4cedd74 (patch) | |
tree | 07a6476c2362584eae3ad224d051111261c06c47 | |
parent | 61a86a752f2cc81f5db8bb4c0ce6e5c07768b0ba (diff) | |
download | sandhi-8242e504d5113a54010eb5863c01b0e0f4cedd74.tar.gz sandhi-8242e504d5113a54010eb5863c01b0e0f4cedd74.tar.bz2 sandhi-8242e504d5113a54010eb5863c01b0e0f4cedd74.zip |
benchmark: added sched compare for 2 tests
-rw-r--r-- | benchmark/bm_registry.py | 15 | ||||
-rw-r--r-- | benchmark/tb_grextras_delay.py | 8 | ||||
-rw-r--r-- | benchmark/tb_grextras_math.py | 8 |
3 files changed, 19 insertions, 12 deletions
diff --git a/benchmark/bm_registry.py b/benchmark/bm_registry.py index c1be8ea..bb9c0cc 100644 --- a/benchmark/bm_registry.py +++ b/benchmark/bm_registry.py @@ -68,10 +68,12 @@ BENCHMARK_MATH_OPS = tokwargs( - GrExtras math blocks avoid an unnecessary memcpy. - GrExtras math blocks enable automatic bufer in-placing.''', tests = [ - tokwargs(wat='GrExtras Adder', args=['tb_grextras_math.py', '1e8', 'extras_add'], env=GRAS_ENV), - tokwargs(wat='gr-blocks Adder', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GRAS_ENV), - tokwargs(wat='GrExtras Multiplier', args=['tb_grextras_math.py', '1e8', 'extras_mult'], env=GRAS_ENV), - tokwargs(wat='gr-blocks Multiplier', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GRAS_ENV), + tokwargs(wat='GrExtras Add\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'extras_add'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Add\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Add\n(GR)', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GR_ENV), + tokwargs(wat='GrExtras Mult\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'extras_mult'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Mult\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Mult\n(GR)', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GR_ENV), ], to_result = lambda t: 1e8/t ) @@ -82,8 +84,9 @@ BENCHMARK_DELAY_BLOCKS = tokwargs( - Compare delay block implementations using GRAS. - The GrExtras implementation uses zero-copy.''', tests = [ - tokwargs(wat='GrExtras Delay\n(zero-copy)', args=['tb_grextras_delay.py', '1e8', 'extras_delay'], env=GRAS_ENV), - tokwargs(wat='gr-core Delay\n(mem-copy)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GRAS_ENV), + tokwargs(wat='GrExtras Delay\n(GRAS)', args=['tb_grextras_delay.py', '1e8', 'extras_delay'], env=GRAS_ENV), + tokwargs(wat='gr-core Delay\n(GRAS)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GRAS_ENV), + tokwargs(wat='gr-core Delay\n(GR)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GR_ENV), ], to_result = lambda t: 1e8/t ) diff --git a/benchmark/tb_grextras_delay.py b/benchmark/tb_grextras_delay.py index 815ab3d..c24a440 100644 --- a/benchmark/tb_grextras_delay.py +++ b/benchmark/tb_grextras_delay.py @@ -1,5 +1,7 @@ -import gras -import grextras +try: + import gras + import grextras +except ImportError: pass import gnuradio from gnuradio import gr import sys @@ -9,7 +11,7 @@ if __name__ == '__main__': num = long(float(sys.argv[1])) what = sys.argv[2] - tb = gras.TopBlock() + tb = gr.top_block() src0 = gr.null_source(8) sink = gr.null_sink(8) head = gr.head(8, num) diff --git a/benchmark/tb_grextras_math.py b/benchmark/tb_grextras_math.py index e238472..144f34c 100644 --- a/benchmark/tb_grextras_math.py +++ b/benchmark/tb_grextras_math.py @@ -1,5 +1,7 @@ -import gras -import grextras +try: + import gras + import grextras +except ImportError: pass import gnuradio from gnuradio import gr from gnuradio import blocks as grblocks @@ -10,7 +12,7 @@ if __name__ == '__main__': num = long(float(sys.argv[1])) what = sys.argv[2] - tb = gras.TopBlock() + tb = gr.top_block() src0 = gr.null_source(8) src1 = gr.null_source(8) sink = gr.null_sink(8) |