From 1a7562e5546b925d473bef997e963c2c503a9785 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 22 Mar 2021 09:43:48 +1000 Subject: [PATCH] fix profile dumping on platforms other than Macs https://github.com/ankitects/anki/pull/1082#issuecomment-803660818 --- qt/aqt/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index 95fd829c4..d47145eb7 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -411,6 +411,8 @@ PROFILE_CODE = os.environ.get("ANKI_PROFILE_CODE") def write_profile_results() -> None: profiler.disable() + profile = os.path.join(os.environ.get("BUILD_WORKSPACE_DIRECTORY", ""), "anki.prof") + profiler.dump_stats(profile) profiler.dump_stats("anki.prof") print("profile stats written to anki.prof") print("use 'bazel run qt:profile' to explore")