MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / lua

Method lua

test/test_benchmark.py:1045–1063  ·  view source on GitHub ↗
(self, benchmark, expected, output_parser=None)

Source from the content-addressed store, hash-verified

1043 self.do_benchmark('matrix_multiply', read_file(test_file('matrix_multiply.cpp')), 'Total elapsed:', output_parser=output_parser, shared_args=['-I' + test_file('benchmark')])
1044
1045 def lua(self, benchmark, expected, output_parser=None):
1046 self.cflags.remove('-Werror')
1047 copy_asset(f'third_party/lua/{benchmark}.lua')
1048
1049 def lib_builder(name, native, env_init):
1050 # Inject -m64 into node-64 benchmarking runs.
1051 env_init['MYCFLAGS'] = env_init.get('CFLAGS', '')
1052 if '-m64' in env_init['MYCFLAGS']:
1053 env_init['MYLDFLAGS'] = '-m64'
1054
1055 # We force recomputation for the native benchmarker because this benchmark
1056 # uses native_exec=True, so we need to copy the native executable
1057 return self.get_library(os.path.join('third_party', 'lua_native' if native else 'lua'), [os.path.join('src', 'lua.o'), os.path.join('src', 'liblua.a')], make=['make', 'generic'], configure=None, native=native, cache_name_extra=name, env_init=env_init, force_rebuild=native)
1058
1059 self.do_benchmark('lua_' + benchmark, '', expected,
1060 force_c=True, args=[benchmark + '.lua', DEFAULT_ARG],
1061 emcc_args=['--embed-file', benchmark + '.lua', '-sFORCE_FILESYSTEM', '-sMINIMAL_RUNTIME=0'], # not minimal because of files
1062 lib_builder=lib_builder, native_exec=os.path.join('building', 'third_party', 'lua_native', 'src', 'lua'),
1063 output_parser=output_parser)
1064
1065 def test_zzz_lua_scimark(self):
1066 def output_parser(output):

Callers 2

test_zzz_lua_scimarkMethod · 0.95

Calls 4

do_benchmarkMethod · 0.95
copy_assetFunction · 0.90
removeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected