Update profiling script
This commit is contained in:
parent
850043b49b
commit
364c32fa79
@ -493,11 +493,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")
|
||||
profile = "out/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")
|
||||
|
||||
|
||||
def run() -> None:
|
||||
|
@ -1,12 +0,0 @@
|
||||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import snakeviz
|
||||
from snakeviz.cli import main
|
||||
|
||||
profile = os.path.join(os.environ["BUILD_WORKSPACE_DIRECTORY"], "anki.prof")
|
||||
sys.argv.append(profile)
|
||||
sys.exit(main())
|
5
tools/profile
Executable file
5
tools/profile
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
ANKI_PROFILE_CODE=1 ./run
|
||||
out/pyenv/bin/pip install snakeviz
|
||||
out/pyenv/bin/snakeviz out/anki.prof
|
Loading…
Reference in New Issue
Block a user