1# AOT JS Perf Test Temporary Execution README 2 3## Environmental Dependencies 4- --------------------------- 5 ### IMPORTANT!!! -->All c_lang/ll_vm and v_8/d_8 are to avoid codecheck inspections, actually there are no underscores in them. 6- -------------------------- 7- For the script's directory, the current user must have the permission to create folders. Please pay attention to the permissions settings for the current directory's user and group. 8 9- openpyxl. No specific version requirement. If not installed, please execute pip3 install openpyxl. 10 11- The environment requires downloading the full OpenHarmony code repository or standalone code repository, and compiling ark_js_vm and the frontend. 12 ```shell 13 #full OpenHarmony code repository 14 ./build.sh --product-name rk3568 --build-target ark_js_host_linux_tools_packages --build-target ets_frontend_build 15 16 #standalone code repository 17 python3 ark.py x64.release 18 ``` 19 20- Configuring the V_8 Engine Execution Environment 21 22**Download:** 23 24```shell 25# you can download to any directory 26wget https://storage.googleapis.com/chromium-%76%38/official/canary/%76%38-linux64-rel-12.0.267.zip --no-check-certificate -O v_8-linux64-rel-12.0.267.zip 27unzip v_8-linux64-rel-12.0.267.zip -d v_8 28# don't forget to get permission to run d_8 29``` 30**Check:** 31```shell 32#excute 33 /path/to/your/d_8 34#show 35 V_8 version 12.0.267 36 d_8> 37``` 38 39**config.json** 40```json 41# Under normal circumstances, you do not need to change the configuration inside. 42{ 43 "full_x86_64":{ 44 "ETS_RUNTIME_PATH": "out/rk3568/c_lang_x64/arkcompiler/ets_runtime/", 45 "ICU_PATH": "out/rk3568/c_lang_x64/thirdparty/icu/", 46 "ZLIB_PATH": "out/rk3568/c_lang_x64/thirdparty/zlib/", 47 "LIB_PATH": "prebuilts/c_lang/ohos/linux-x86_64/ll_vm/lib/", 48 "ES2ABC": "out/rk3568/c_lang_x64/arkcompiler/ets_frontend/es2abc" 49 }, 50 "independent_x86_64": { 51 "ETS_RUNTIME_PATH": "out/x64.release/arkcompiler/ets_runtime", 52 "ICU_PATH": "out/x64.release/thirdparty/icu/", 53 "ZLIB_PATH": "", # you can let this value be empty,but dont delete this key 54 "LIB_PATH": "", # you can let this value be empty,but dont delete this key 55 "ES2ABC": "out/x64.release/arkcompiler/ets_frontend/es2abc" 56 } 57} 58``` 59 60## excute 611) How to run perftest 62```shell 63# openharmony_path is the code repository root directory (which has out/ after build) 64bash run_js_perf_test.sh js_report_save_path openharmony_path d_8_binary_path ver_platform 65#example full OpenHarmony code repository 66bash run_js_perf_test.sh /home/report /home/codeOpenharmony /home/v_8/d_8 full_x86_64 67#example standalone code repository 68bash run_js_perf_test.sh /home/report /home/standalone /home/v_8/d_8 independent_x86_64 69``` 702) When aot perf test start to run,the perf test cases will be downloaded automatically . 71But after run, perftest case will be deleted too. 72 73u can check them in: 74[perf-test-case](https://gitee.com/dov1s/arkjs-perf-test/tree/builtins_test1110/) 75 76if u dont want the script deletes test cases,please command out this line in run_js_test.py 77```python 78# last line 79shutil.rmtree(Constants.TMP_PATH) 80``` 81 82## stat 83After running, a excel will be created in js_report_save_path(the directory u choose when bash run_js_perf_test.sh) 84 85 86 87