Plugin profiling

From Buzztard

Jump to: navigation, search

For an application it is interesting to find out how much CPU time each pipeline element uses. To calculate this one needs to know the overall time the process uses and the time spend in each plugin.

Idea 1

To determine time spend in elements, one could iterate over the plugin graph and replace all the _getrange() and _chain() functions with profiling wrappers. The original callbackadress should be stored as qdata("profile::callback") in the pad. The wrappers take times before and after calling the actual hook and store the timediff as qdata("profile::counter") in the pad.

To get the percentages we need a list of elements where each has a list of pads in turn. We then sum up the times for each element and also build a sum for all elements. The total sum for all elements equals to 100%.

Links

Support Us

Collaboration

SourceForge Logo
GStreamer Logo
Become a Friend of GNOME
Linux Sound Logo
MediaWiki
Valgrind
GNU Library Public Licence
GNU Free Documentation License 1.2