GstShark - Example: Interlatency

From RidgeRun Developer Wiki





Previous: Example: Scheduling time Index Next: Contact Us




GstShark includes the inter latency tracer, which was developed with the purpose of measuring the time that a buffer takes to travel from one point to another inside the pipeline. Specifically, the GstShark inter latency tracer gives the time needed by a buffer for travel from the source pad of the source element to the source pad of the remaining elements of the pipeline. Therefore the measurements given for the sink element at the end of the downstream will correspond to the general latency of the pipeline, in other words, that measurement is the total time needed by a buffer to go through the entire pipeline.

Based on the kind of measurements that the GstShark inter latency tracer does, it is possible to know what route of the pipeline is increasing the overall latency by displaying the exact amount of time that the buffer took to go through every element on the pipeline.

It is important to mention that given the nature of the GstShark inter latency tracer; it has the limitation that, currently, it only supports source elements, sink elements and filter elements. For the rest of categories of elements available in GStreamer the GstShark inter latency tracer will not crash but it will not be accurate in its measurements. For more information, refer to the tracer's page.

Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.

Test pipeline

The following pipeline is the same used in the scheduling time tracer example. This gives a good example of how both tracers can be used together to analyze a pipeline.

GST_DEBUG="GST_TRACER:7" GST_TRACERS="interlatency" gst-launch-1.0 \
videotestsrc is-live=true do-timestamp=true num-buffers=50 ! \
'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)10/1' ! \
videoconvert ! queue ! avenc_h263p ! fakesink sync=true

Plot

Latency between the src pad of the source element and the src pad of each one of the remaining elements of the pipeline

The plot with the given results for the inter latency tracer has to be interpreted vertically: for an element that is lower downstream, the time needed to get from the source element to it will be higher. That is why in the plot it seems like the line of the rightmost element in the pipeline is at an upper level than the previous one. It can be seen as an accumulated time for every element to the right of the pipeline to the sink element, which will have the highest value.


Previous: Example: Scheduling time Index Next: Contact Us