flameprof icon indicating copy to clipboard operation
flameprof copied to clipboard

Flameprof is failing to parse profile output

Open itamarst opened this issue 4 years ago • 7 comments

Hi,

I'd like to tell people about flameprof in talk I'm giving, but it's failing for me:

$ python -m cProfile -o out.prof benchmarks/serialization.py
$ flameprof out.prof > prof.svg
Warning: flameprof can't find proper roots, root cumtime is 0.0 but sum tottime is 1.6221999999999899

I'm specifically running the benchmark from https://github.com/itamarst/eliot

itamarst avatar Sep 16 '19 21:09 itamarst

I’m having the same problem. Running on:

  • Ubuntu 20.04
  • Python 3.8.2

Just to be clear, an SVG is being produced. But it I don't have confidence in it.

GabrielC101 avatar Aug 08 '20 17:08 GabrielC101

same problem

  • macOS: 11.5.2 (20G95) Intel
  • Anaconda Python: Python 3.9.7 | packaged by conda-forge | (default, Sep 2 2021, 17:58:46)

test.zip

jeffguorg avatar Sep 07 '21 07:09 jeffguorg

https://jiffyclub.github.io/snakeviz/ is an alternative, for those who can't use flameprof.

itamarst avatar Sep 07 '21 11:09 itamarst

Snakeviz has the same limitation: https://github.com/jiffyclub/snakeviz/issues/117

That warning is a hallmark of using cProfile on something that is threaded. Using yappi instead will result in the warning being different, but the graph will still be a bit screwy.

Snakeviz actually completely fails to display any info for some threads that flameprof at least kinda-sorta catches.

Entropy512 avatar Jun 14 '22 15:06 Entropy512

@Entropy512 I am experiencing the same issue

  • without threading, while
  • snakeviz is working on the same .prof file.

Python: 3.9.13 flameprof: 0.4

matheburg avatar Jul 14 '22 06:07 matheburg