Designed to save pstats log to folder...
pip3 install pstats_extenderimport pstats_extender
@pstats_extender.profile()
def some_function():
...import pstats_extender
with pstats_extender.profile(
sortby=pstats_extenter.SortKey.CUMULATIVE, directory="../pstats"
):
# your code hereimport pstats_extender
with pstats_extender.profile():
# your code hereThis project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.