GstShark - Example: Processing time

From RidgeRun Developer Wiki





Previous: Example: Frame rate Index Next: Example: Scheduling time




The GstShark processing time tracer ("proctime") provides information to the user about the amount of time that each element of the pipeline is taking for processing each data buffer that goes through it. In other words, it measures the time every element needs to process a buffer, allowing to know which element takes too much time to complete its tasks, causing slow performance, among other issues.

The processing time tracer was designed for work with filters and filters-like elements that process the inputs and outputs in the same thread, more information about this limitation and the performance of the tracer is provided on the tracer's page.

The following example is a pipeline that has a different delay on every branch of it (the tee element used was with the purpose of dividing the pipeline), in order to show different processing times for each element and demonstrate how the GstShark processing time tracer does the measurements. The delay in every branch of the pipeline is being done by the identity elements with a sleep time that simulates a constant processing time.

In the plot available next there will be lines of the plot longer than the others, this is because each identity element has to process 60 frames and therefore an element with longer processing time also needs a longer time to process all the input buffers.

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

Test pipeline

GST_DEBUG="GST_TRACER:7" GST_TRACERS="proctime" gst-launch-1.0 videotestsrc num-buffers=60 ! \
tee name=tee0 \
tee0. ! queue ! identity sleep-time=10000 ! fakesink \
tee0. ! queue ! identity sleep-time=30000 ! fakesink \
tee0. ! queue ! identity sleep-time=50000 ! fakesink

Results

Processing time for each element of the pipeline



Previous: Example: Frame rate Index Next: Example: Scheduling time