mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
debug-viewer: add more logging and some profiling how-to
The port is much slower than the gtk3 version. Try to figure why.
This commit is contained in:
parent
248d18ee72
commit
016449a53c
3 changed files with 14 additions and 3 deletions
|
@ -460,7 +460,7 @@ class LogFile (Producer):
|
||||||
self.have_load_started ()
|
self.have_load_started ()
|
||||||
|
|
||||||
def handle_load_finished (self):
|
def handle_load_finished (self):
|
||||||
|
self.logger.debug ("finish loading")
|
||||||
self.lines = LogLines (self.fileobj, self.line_cache)
|
self.lines = LogLines (self.fileobj, self.line_cache)
|
||||||
|
|
||||||
# Chain up to our consumers:
|
# Chain up to our consumers:
|
||||||
|
|
|
@ -908,6 +908,7 @@ class Window (object):
|
||||||
_("It is not a GStreamer log file."))
|
_("It is not a GStreamer log file."))
|
||||||
|
|
||||||
def idle_set ():
|
def idle_set ():
|
||||||
|
self.logger.debug ("idle trigger after load finished")
|
||||||
self.log_view.set_model (self.log_filter)
|
self.log_view.set_model (self.log_filter)
|
||||||
|
|
||||||
self.line_view.handle_attach_log_file (self)
|
self.line_view.handle_attach_log_file (self)
|
||||||
|
|
|
@ -21,6 +21,16 @@ NEW: column.pack_start (cell, True)
|
||||||
OLD: view_column.get_cell_renderers ()
|
OLD: view_column.get_cell_renderers ()
|
||||||
NEW: column.get_cells ()
|
NEW: column.get_cells ()
|
||||||
|
|
||||||
= porting ressources =
|
# porting ressources #
|
||||||
https://www.xpra.org/trac/ticket/90?cversion=0&cnum_hist=3
|
https://www.xpra.org/trac/ticket/90?cversion=0&cnum_hist=3
|
||||||
https://mail.gnome.org/archives/commits-list/2013-October/msg05205.html
|
https://mail.gnome.org/archives/commits-list/2013-October/msg05205.html
|
||||||
|
|
||||||
|
# profiling #
|
||||||
|
python -m profile -o output.pstats path/to/your/script arg1 arg2
|
||||||
|
gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png
|
||||||
|
~/projects/tools/gprof2dot/gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png
|
||||||
|
eog output.png
|
||||||
|
|
||||||
|
python -m cProfile -o output.pstats2 ./gst-debug-viewer debug.noansi.log
|
||||||
|
~/projects/tools/gprof2dot/gprof2dot.py -f pstats output.pstats2 | dot -Tpng -o output2.png
|
||||||
|
eog output2.png
|
||||||
|
|
Loading…
Reference in a new issue