Skip to content

Commit

Permalink
Add Bash/Zsh script to run time profiling for any Python module
Browse files Browse the repository at this point in the history
  • Loading branch information
Okroshiashvili committed Mar 14, 2023
1 parent 114da0c commit e98fe3c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions profiling/profiling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mkdir -p profiles/code_profiles

file="$@"

pyinstrument -r html -o profiles/code_profiles/performance_profile_$(date "+%Y.%m.%d-%H:%M").html $file

pyinstrument -r speedscope -o profiles/code_profiles/speedscope_$(date "+%Y.%m.%d-%H:%M").json $file

0 comments on commit e98fe3c

Please sign in to comment.