Skip to content

Commit 75ef055

Browse files
committed
Remove numpy dependency
1 parent d9fce4e commit 75ef055

File tree

7 files changed

+18
-268701
lines changed

7 files changed

+18
-268701
lines changed

benchmarks/Snakefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ rule profile:
7676
output:
7777
"results/{problem}/{library}_{solver}_{size}.prof"
7878
shell:
79-
"python -m cProfile -o results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}.prof src/run_benchmark.py {wildcards.problem} --library {wildcards.library} --solver {wildcards.solver} --size {wildcards.size}"
79+
"py-spy record -s -t -f speedscope --rate 20 --native -o results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}.prof -- python src/run_benchmark.py {wildcards.problem} --library {wildcards.library} --solver {wildcards.solver} --size {wildcards.size}"
8080

81-
rule snakeviz:
82-
input:
83-
"results/{problem}/{library}_{solver}_{size}.prof"
81+
rule mem_profile:
82+
threads: available_cpu_count()
83+
output:
84+
"results/{problem}/{library}_{solver}_{size}_memray.html"
8485
shell:
85-
"snakeviz results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}.prof"
86+
"""
87+
memray run --trace-python-allocators --native --aggregate -o results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}_memray.bin src/run_benchmark.py {wildcards.problem} --library {wildcards.library} --solver {wildcards.solver} --size {wildcards.size}
88+
memray flamegraph -o results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}_memray.html results/{wildcards.problem}/{wildcards.library}_{wildcards.solver}_{wildcards.size}_memray.bin
89+
"""
90+

benchmarks/profile.html

Lines changed: 0 additions & 12300 deletions
This file was deleted.

0 commit comments

Comments
 (0)