GstShark - gstshark-plot

From RidgeRun Developer Wiki





Previous: Visualization Tools Index Next: Eclipse plugin




gstshark-plot is a set of Octave scripts included with GstShark. They provide a set of tools to create plots of the results of the tracers.

Location

The gstshark-plot scripts are located in scripts/graphics directory, inside the repository. The main script that processes the data is the gstshark-plot script. Currently, the scripts need to be run on this directory, but on upcoming releases, the scripts will be accessible from any path.

Preparing to run gstshark-plot

To generate the plots, it is required to install Octave and a few other dependencies. For more information about the requirements and how to install them, refer to the install guide.

Before generating the plots, a set of CTF traces should be obtained, by running the pipeline with the required tracers enabled. Make sure the GST_SHARK_CTF_DISABLE environment variable is unset, to enable the generation of the full traces.

unset GST_SHARK_CTF_DISABLE

For more information about the steps to create the traces, refer to the instructions.

Running the script

Currently, the gstshark-plot script needs to run from the path inside the repository. The scripts have the capability to filter the CTF log file by each tracer and thus will generate a plot for every tracer run. Depending on the tracer selected, the plot might include additional information, such as the average of the measurements taken. The command to run the Octave scripts and obtaining the resulting plots is as follows:

$ cd ${GSTSHARK_REPO}/scripts/graphics
$ ./gstshark-plot <path to the CTF output directory>

Octave will process the trace files found in the directory and exit. It is possible to remain in the Octave by running the script using the -p option:

$ ./gstshark-plot -p <path to the CTF output directory>

Output files

Two output formats are available: PNG or PDF. In PDF mode, all the trace plots will be saved to a single PDF file, with the name tracer.pdf. In PNG mode, the plots will be saved as individual PNG files with the names of the corresponding tracers being plotted.

$ ./gstshark-plot <path to the CTF output folder> -s <pdf|png>

Additional options

The legend for the plot can be placed on the inside of the plot area (which makes the plot area larger) or on the outside (which prevents the legend from overlapping the plot lines). It can also be placed in a separate window or page.

$ ./gstshark-plot <path to the CTF output folder> -l <inside|outside|extern>

Help

gstshark-plot includes a help screen with a summary of all the options available.

$ ./gstshark-plot --help
Ridgerun Gstshark

usage : ./gstshark-plot DIR [options]

  DIR                            Input trace directory
  --help                         This help message
  -s, --savefig [pdf|png]        Save the graphics generated
                                 FORMAT: Output file format, png or pdf
                                 (default: pdf)
  -p, --persist                  keep octave console open
  -l, --legend <inside|outside|extern>
                                 Indicate the position of the legend
                                 over each graphic generated
                                 extern: display the legend over an external window
                                 (default: inside)
 -f, --filter [pattern]          Filter events that contains a match to the given pattern. The pattern is interpreted
                                 as an extended regular expression.
                                 For example:
                                 Select one element information: ./gstshark-plot gstshark_filtered -p --filter x264enc
                                 Select more the one element:    ./gstshark-plot gstshark_filtered -p --filter "x264enc|udpsink"


Previous: Visualization Tools Index Next: Eclipse plugin