benchmark for rpyc and rpyzebu added

parent 5e9bf330
......@@ -437,7 +437,7 @@ def test_collision_detection():
start = time.time()
res = subprocess.call(
'sudo LD_LIBRARY_PATH=$PWD/emit:$LD_LIBRARY_PATH MU_LOG_LEVEL=trace %s' % exec_path, shell=True)
'sudo LD_LIBRARY_PATH=$PWD/emit:$LD_LIBRARY_PATH MU_LOG_LEVEL=error %s' % exec_path, shell=True)
end = time.time()
......@@ -448,3 +448,51 @@ def test_collision_detection():
assert False
assert 0 <= res <= 50
@may_spawn_proc
def test_collision_detection_simplified_rpyc():
import subprocess
import os
from rpython.dev.dev_CD_simplified.main import Main
logger.info('going to build the test function')
exec_path = executable_from_rpy_func(Main.main, None, rffi.SIGNED, backend='c')
logger.info('going to run the test function')
start = time.time()
res = subprocess.call(
'%s' % exec_path, shell=True)
end = time.time()
logger.info("Test took: ")
logger.info(end-start)
logger.info('returned res = %d' % res)
assert False
assert 0 <= res <= 50
@may_spawn_proc
def test_collision_detection_simplified_zebu():
import subprocess
import os
from rpython.dev.dev_CD_simplified.main import Main
logger.info('going to build the test function')
exec_path = executable_from_rpy_func(Main.main_zebu, [rffi.CCHARP], rffi.SIGNED, backend='mu')
logger.info('going to run the test function')
start = time.time()
res = subprocess.call(
'sudo LD_LIBRARY_PATH=$PWD/emit:$LD_LIBRARY_PATH MU_LOG_LEVEL=error %s' % exec_path, shell=True)
end = time.time()
logger.info("Test took: ")
logger.info(end-start)
logger.info('returned res = %d' % res)
assert False
assert 0 <= res <= 50
......@@ -243,7 +243,7 @@ def executable_from_rpy_func(rpy_fnc, llargtypes, llrestype, mode=ctypes.RTLD_GL
print("compiled to executable: %s" % res[2])
# extras = (db, bdlgen)
else:
libpath = t.compile_c()
fnc_name = 'pypy_g_' + rpy_fnc.__name__
exec_path = t.compile_c()
# fnc_name = 'pypy_g_' + rpy_fnc.__name__
# extras = None
return exec_path
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment