Skip to content

Profiling and plotting outputs

Arun Paidimarri edited this page May 9, 2019 · 1 revision

Profiling

cd catkin_ws/src/era_gazebo/utils

As an example, the command ./profile_era.py -p perf_stat -o stat_tx.csv -t 100 -c "/home/username/catkin_ws/src/dsrc/gr-ieee802-11/examples/wifi_transceiver_standalone_txonly.py --encoding 0 --samp-rate 10M --msg-count 2000000 --strobe-period 2" profiles a standalone transmitter for 100 seconds with a 10MHz bandwidth and a 2ms strobe period with encoding 0 and generates stat_rx.csv

As a second example, the command ./profile_era.py -p perf_stat -o stat_rx.csv -t 100 -c "/home/username/catkin_ws/src/dsrc/gr-ieee802-11/examples/wifi_transceiver_standalone_rxonly2.py --samp-rate 10M" profiles a standalone receiver for 100 seconds with a 10MHz bandwidth and generates stat_rx.csv. In this case, make sure to run a standalone transmitter with appropriate strobe period and bandwidth from another machine.

Plotting

Now, using the script parse_plot_perf_stat.py, we can make plots using the CSV files. ./parse_plot_perf_stat.py -h will give a help text with information on the arguments of the program. As an Example:

./parse_plot_perf_stat.py -k cycles -d 100 -t 'TX_versus_RX' -n 0 -m disp stat_tx.csv stat_rx.csv will parse the two previously generated CSV files, look for the keyword cycles, normalize counters for the 100second duration and plot all the underlying functions as a bar graph and display it.

  • The list of keywords accepted by the script can be modified in the script. As of now, only cycles and instructions are accepted.
  • the parse_plot_perf_stat.py can also be used as a python package. As an example the script outputs_v4_plots.py parses some files using the functions from the package, and plots the files. This allows finer tuning of display parameters, labels etc. This option could be used for generating final images used for publications etc.