From ae2ed3c15fc2059ee3dbec59ed73a4d5a8fc15ab Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Nov 2021 08:14:13 -0800 Subject: [PATCH 1/3] Rebaseline code size tests --- tests/code_size/hello_webgl2_wasm.json | 10 +++++----- tests/code_size/hello_webgl2_wasm2js.json | 8 ++++---- tests/code_size/hello_webgl_wasm.json | 10 +++++----- tests/code_size/hello_webgl_wasm2js.json | 8 ++++---- tests/code_size/random_printf_wasm2js.json | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/code_size/hello_webgl2_wasm.json b/tests/code_size/hello_webgl2_wasm.json index bd29e0cb24088..207274fe2486d 100644 --- a/tests/code_size/hello_webgl2_wasm.json +++ b/tests/code_size/hello_webgl2_wasm.json @@ -1,10 +1,10 @@ { "a.html": 563, "a.html.gz": 377, - "a.js": 5000, - "a.js.gz": 2422, + "a.js": 4987, + "a.js.gz": 2406, "a.wasm": 10304, - "a.wasm.gz": 6635, - "total": 15867, - "total_gz": 9434 + "a.wasm.gz": 6641, + "total": 15854, + "total_gz": 9424 } diff --git a/tests/code_size/hello_webgl2_wasm2js.json b/tests/code_size/hello_webgl2_wasm2js.json index efaa5dc7bbeb6..aa898ba2fefde 100644 --- a/tests/code_size/hello_webgl2_wasm2js.json +++ b/tests/code_size/hello_webgl2_wasm2js.json @@ -1,10 +1,10 @@ { "a.html": 588, "a.html.gz": 386, - "a.js": 19899, - "a.js.gz": 8160, + "a.js": 19905, + "a.js.gz": 8151, "a.mem": 3171, "a.mem.gz": 2714, - "total": 23658, - "total_gz": 11260 + "total": 23664, + "total_gz": 11251 } diff --git a/tests/code_size/hello_webgl_wasm.json b/tests/code_size/hello_webgl_wasm.json index de8b3eb3fe263..cbefb0cc8535f 100644 --- a/tests/code_size/hello_webgl_wasm.json +++ b/tests/code_size/hello_webgl_wasm.json @@ -1,10 +1,10 @@ { "a.html": 563, "a.html.gz": 377, - "a.js": 4486, - "a.js.gz": 2249, + "a.js": 4471, + "a.js.gz": 2236, "a.wasm": 10304, - "a.wasm.gz": 6635, - "total": 15353, - "total_gz": 9261 + "a.wasm.gz": 6641, + "total": 15338, + "total_gz": 9254 } diff --git a/tests/code_size/hello_webgl_wasm2js.json b/tests/code_size/hello_webgl_wasm2js.json index 19a4d821a0ea3..0571560cc5ab5 100644 --- a/tests/code_size/hello_webgl_wasm2js.json +++ b/tests/code_size/hello_webgl_wasm2js.json @@ -1,10 +1,10 @@ { "a.html": 588, "a.html.gz": 386, - "a.js": 19384, - "a.js.gz": 7995, + "a.js": 19387, + "a.js.gz": 7988, "a.mem": 3171, "a.mem.gz": 2714, - "total": 23143, - "total_gz": 11095 + "total": 23146, + "total_gz": 11088 } diff --git a/tests/code_size/random_printf_wasm2js.json b/tests/code_size/random_printf_wasm2js.json index 6cd13a837388b..fcf7a58695fc5 100644 --- a/tests/code_size/random_printf_wasm2js.json +++ b/tests/code_size/random_printf_wasm2js.json @@ -1,6 +1,6 @@ { - "a.html": 17231, - "a.html.gz": 7438, - "total": 17231, - "total_gz": 7438 + "a.html": 17295, + "a.html.gz": 7448, + "total": 17295, + "total_gz": 7448 } From 83555b8f54f98f5a319c4694c49d402a77879d5d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Nov 2021 13:26:13 -0800 Subject: [PATCH 2/3] debug logging --- tests/test_other.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_other.py b/tests/test_other.py index 956ef78364f40..b0526fd5f2bc3 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -9026,6 +9026,7 @@ def get_file_gzipped_size(f): print('Oops, overall generated code size regressed by ' + str(total_output_size - total_expected_size) + ' bytes!') if total_output_size < total_expected_size: print('Hey amazing, overall generated code size was improved by ' + str(total_expected_size - total_output_size) + ' bytes! Rerun test with other.test_minimal_runtime_code_size with EMTEST_REBASELINE=1 to update the expected sizes!') + print(open('a.html').read()) self.assertEqual(total_output_size, total_expected_size) # Tests the library_c_preprocessor.js functionality. From 7c96fca75bef16fa7c108a89ad2cf40a7d362aff Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 Nov 2021 13:33:31 -0800 Subject: [PATCH 3/3] update after npm install --- tests/code_size/hello_webgl2_wasm.json | 12 ++++++------ tests/code_size/hello_webgl2_wasm2js.json | 10 +++++----- tests/code_size/hello_webgl_wasm.json | 12 ++++++------ tests/code_size/hello_webgl_wasm2js.json | 12 ++++++------ tests/code_size/hello_world_wasm.json | 8 ++++---- tests/code_size/hello_world_wasm2js.json | 8 ++++---- tests/code_size/random_printf_wasm2js.json | 8 ++++---- tests/test_other.py | 1 - 8 files changed, 35 insertions(+), 36 deletions(-) diff --git a/tests/code_size/hello_webgl2_wasm.json b/tests/code_size/hello_webgl2_wasm.json index 207274fe2486d..97582974b0232 100644 --- a/tests/code_size/hello_webgl2_wasm.json +++ b/tests/code_size/hello_webgl2_wasm.json @@ -1,10 +1,10 @@ { - "a.html": 563, - "a.html.gz": 377, - "a.js": 4987, - "a.js.gz": 2406, + "a.html": 569, + "a.html.gz": 379, + "a.js": 5000, + "a.js.gz": 2422, "a.wasm": 10304, "a.wasm.gz": 6641, - "total": 15854, - "total_gz": 9424 + "total": 15873, + "total_gz": 9442 } diff --git a/tests/code_size/hello_webgl2_wasm2js.json b/tests/code_size/hello_webgl2_wasm2js.json index aa898ba2fefde..8b0ccdd738263 100644 --- a/tests/code_size/hello_webgl2_wasm2js.json +++ b/tests/code_size/hello_webgl2_wasm2js.json @@ -1,10 +1,10 @@ { - "a.html": 588, - "a.html.gz": 386, - "a.js": 19905, - "a.js.gz": 8151, + "a.html": 594, + "a.html.gz": 389, + "a.js": 19899, + "a.js.gz": 8159, "a.mem": 3171, "a.mem.gz": 2714, "total": 23664, - "total_gz": 11251 + "total_gz": 11262 } diff --git a/tests/code_size/hello_webgl_wasm.json b/tests/code_size/hello_webgl_wasm.json index cbefb0cc8535f..6550631f1b61e 100644 --- a/tests/code_size/hello_webgl_wasm.json +++ b/tests/code_size/hello_webgl_wasm.json @@ -1,10 +1,10 @@ { - "a.html": 563, - "a.html.gz": 377, - "a.js": 4471, - "a.js.gz": 2236, + "a.html": 569, + "a.html.gz": 379, + "a.js": 4486, + "a.js.gz": 2249, "a.wasm": 10304, "a.wasm.gz": 6641, - "total": 15338, - "total_gz": 9254 + "total": 15359, + "total_gz": 9269 } diff --git a/tests/code_size/hello_webgl_wasm2js.json b/tests/code_size/hello_webgl_wasm2js.json index 0571560cc5ab5..0c6ab4d004aed 100644 --- a/tests/code_size/hello_webgl_wasm2js.json +++ b/tests/code_size/hello_webgl_wasm2js.json @@ -1,10 +1,10 @@ { - "a.html": 588, - "a.html.gz": 386, - "a.js": 19387, - "a.js.gz": 7988, + "a.html": 594, + "a.html.gz": 389, + "a.js": 19384, + "a.js.gz": 7996, "a.mem": 3171, "a.mem.gz": 2714, - "total": 23146, - "total_gz": 11088 + "total": 23149, + "total_gz": 11099 } diff --git a/tests/code_size/hello_world_wasm.json b/tests/code_size/hello_world_wasm.json index 33541b45ec174..4c8979dee71d7 100644 --- a/tests/code_size/hello_world_wasm.json +++ b/tests/code_size/hello_world_wasm.json @@ -1,10 +1,10 @@ { - "a.html": 665, - "a.html.gz": 427, + "a.html": 673, + "a.html.gz": 431, "a.js": 300, "a.js.gz": 249, "a.wasm": 104, "a.wasm.gz": 112, - "total": 1069, - "total_gz": 788 + "total": 1077, + "total_gz": 792 } diff --git a/tests/code_size/hello_world_wasm2js.json b/tests/code_size/hello_world_wasm2js.json index 6d3d38ca2a127..57640e10e6a02 100644 --- a/tests/code_size/hello_world_wasm2js.json +++ b/tests/code_size/hello_world_wasm2js.json @@ -1,10 +1,10 @@ { - "a.html": 697, - "a.html.gz": 437, + "a.html": 705, + "a.html.gz": 441, "a.js": 851, "a.js.gz": 499, "a.mem": 6, "a.mem.gz": 32, - "total": 1554, - "total_gz": 968 + "total": 1562, + "total_gz": 972 } diff --git a/tests/code_size/random_printf_wasm2js.json b/tests/code_size/random_printf_wasm2js.json index fcf7a58695fc5..9e1bec3663df3 100644 --- a/tests/code_size/random_printf_wasm2js.json +++ b/tests/code_size/random_printf_wasm2js.json @@ -1,6 +1,6 @@ { - "a.html": 17295, - "a.html.gz": 7448, - "total": 17295, - "total_gz": 7448 + "a.html": 17240, + "a.html.gz": 7441, + "total": 17240, + "total_gz": 7441 } diff --git a/tests/test_other.py b/tests/test_other.py index b0526fd5f2bc3..956ef78364f40 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -9026,7 +9026,6 @@ def get_file_gzipped_size(f): print('Oops, overall generated code size regressed by ' + str(total_output_size - total_expected_size) + ' bytes!') if total_output_size < total_expected_size: print('Hey amazing, overall generated code size was improved by ' + str(total_expected_size - total_output_size) + ' bytes! Rerun test with other.test_minimal_runtime_code_size with EMTEST_REBASELINE=1 to update the expected sizes!') - print(open('a.html').read()) self.assertEqual(total_output_size, total_expected_size) # Tests the library_c_preprocessor.js functionality.