#!/bin/sh
echo "profiling to pyprofile.pstats and pyprofile.txt"
python3 -m cProfile -o pyprofile.pstats "$@"; ret=$?
python3 -c 'from pstats import Stats; Stats("pyprofile.pstats").print_stats()' > pyprofile.txt
less pyprofile.txt
exit $ret
