Questions tagged [yappi]

Yappi is yet another Python profiler.

Yappi is yet another Python profiler.

Features:

  • Profiling of multithreaded Python applications transparently.
  • Supports profiling per-thread CPU time(new in 0.62)
  • Profiler can be started from any thread at any time.
  • Ability to get statistics at any time without even stopping the profiler.
  • Various flags to arrange/sort profiler results.
  • Supports Python 2.3 <= x <= Python 3.2.
10 questions
8
votes
0 answers

Python profiling: KCacheGrind + Yappi keeps displaying an unknown function

I want to profile my Python program to understand why it is so slow. I decided to use Yappi - because my program is multithreaded - and to diplay the results with KCacheGrind. Here is how I do it: # Profile of the update method def…
Gaëtan
  • 779
  • 1
  • 8
  • 26
2
votes
1 answer

Yappi returns weird results

I am running yappi python profiler in a multi-threaded process an I get weird results when printing with yappi.print_stats(). Some methods repeat more than once, in each of the lines they show different ttot and ncalls. Some methods surprisingly…
Yariv
  • 12,945
  • 19
  • 54
  • 75
1
vote
0 answers

Can the Pycharm profiler, cProfile, be set to profile only a couple of lines of code and not the whole script?

Pycharm's standard profiler for python is cProfile or Yappi. While using cProfile in Pycharm, you don't have to change or edit your code, you just have to use the graphical interface and press the profile button. However, whenever I do this, Pycharm…
1
vote
1 answer

Proflie multi-thread python application

I'm using Pycharm IDE on a multi thread python application. I tried the default cProfile and the yappi but cannot get results for threads other than the main thread. I'm using python 3.6. Any help?
Amit_JCI
  • 159
  • 1
  • 14
1
vote
1 answer

Profiling an application that uses reactors/websockets and threads

Hi I wrote a Python program that should run unattended. What it basically does is fetching some data via http get requests in a couple of threads and fetching data via websockets and the autobahn framework. Running it for 2 days shows me that it has…
daeda
  • 369
  • 5
  • 14
0
votes
0 answers

yappi profiler not working on FastAPI uvicorn threads

Overview I tried using yappi (version 1.4.0) to profile my python (3.10) server. I am using FastAPI version 0.88.0 and uvicorn version 0.20.0 , And no matter how I try to run multithreaded-profiling I cannot get yappi to capture anything but the…
0
votes
1 answer

What is the performance impact of Python profiling?

I am considering profiling a Python application in production (such as a Django website). I've found many options that self-describe as lightweight and demonstrate how they are used (including cProfile, vmprof, yappi and DTrace/SystemTap) but I am…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
0
votes
1 answer

Yappi ModuleNotFoundError even after installation

I have installed yappi successfully but still I'm getting ModuleNotFoundError while importing yappi in the same shell: ((python) ) soumeng78@linux-16 $ pipenv install git+https://github.com/sumerc/yappi#egg=yappi Installing…
soumeng78
  • 600
  • 7
  • 12
0
votes
1 answer

Peewee query runs slow with multithreading

I found this interesting scenerio when using peewee with threading. I have a table looks like this class Locks(BaseModel): _id = AutoField() name = CharField(unique=True, index=True) last_modify_time = DateTimeField(constraints=[SQL("DEFAULT…
0
votes
1 answer

Python 2.7 easy_install - the process cannot access the file because it is being used by another process error

Using Python I am trying to install a library called yappi through easy_install. However I am getting this error below on Windows 7 Command Shell: I explored alternative installations. I tried previously 'pip install yappi' but this didn't work due…
Jebathon
  • 4,310
  • 14
  • 57
  • 108