| 172 | == Profiling Deluge daemon with == |
| 173 | |
| 174 | The daemon can be profiled using the command line option --profile. |
| 175 | {{{ |
| 176 | deluged --profile |
| 177 | }}} |
| 178 | Deluge 1.3.X uses [http://docs.python.org/2/library/hotshot.html hotshot]. You can convert hotshot profiling data to [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind] calltree format using hotshot2calltree: |
| 179 | {{{ |
| 180 | hotshot2calltree -o deluged_calltree.profile deluged.profile |
| 181 | }}} |
| 182 | git-master uses cProfile so the output can be opened directly by [http://www.vrplumber.com/programming/runsnakerun RunSnakeRun]. To open this in KCachegrind (-k option opens the result in KCachegrind automatically): |
| 183 | {{{ |
| 184 | pyprof2calltree -i deluged.profile -k |
| 185 | }}} |