(self, benchmark, expected, output_parser=None)
| 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): |
no test coverage detected