From b2291f8f9dd0e89b0db5f14879b31f3744bb132d Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 22 Jul 2021 05:30:34 +0000 Subject: [PATCH] Fix stack usage benchmark in node (#1734) --- .circleci/config.yml | 2 +- benchmark/stack_usage.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50839643a..f7c808546 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -161,7 +161,7 @@ jobs: - run: name: stack-size command: | - pytest -s benchmark/stack_usage.py | sed -n 's/## //pg' || true + pytest -s benchmark/stack_usage.py | sed -n 's/## //pg' test-emsdk: <<: *defaults diff --git a/benchmark/stack_usage.py b/benchmark/stack_usage.py index 1649763b9..c4f4d4f21 100644 --- a/benchmark/stack_usage.py +++ b/benchmark/stack_usage.py @@ -31,7 +31,7 @@ def print_info(): def test_stack_usage(selenium, print_info): res = selenium.run_js( """ - window.measure_available_js_stack_depth = () => { + self.measure_available_js_stack_depth = () => { let depth = 0; function recurse() { depth += 1; recurse(); } try { recurse(); } catch (err) { } @@ -44,7 +44,7 @@ def test_stack_usage(selenium, print_info): (recurse(0)-recurse(100))/100 `); let js_depth = measure_available_js_stack_depth(); - window.py_depth = [0]; + self.py_depth = [0]; try { pyodide.runPython(` import sys