1

I'm using the cProfiler in my script. I'd like to output the .cprofile file with results. I want to get the output file that is not human readable and later open it in snakeviz. Is that possible?

I cannot use the

python -m cProfile -o program.prof my_program.py

command, because I'm runing the script with the Python interpreter embedded in the Autodesk Maya software in gui mode.

Kowalski Paweł
  • 594
  • 1
  • 6
  • 27

1 Answers1

0

Ok, I've asked the question too soon. I've found that:

cProfile.run('function', 'path')

can do this

Kowalski Paweł
  • 594
  • 1
  • 6
  • 27