fix profile dumping on platforms other than Macs

https://github.com/ankitects/anki/pull/1082#issuecomment-803660818
This commit is contained in:
Damien Elmes 2021-03-22 09:43:48 +10:00
parent 7d8f19e6e4
commit 1a7562e554

View File

@ -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")