The scripts in this directory serve the processing and plotting of the experiment results
parse_results.py
transform the logs from the experiment runs into easier to work with CSV files.plot_cdf.py
is used to generate the CDF plots you can see in the paper from thetimes
CSV files.plot_stats.py
is used to generate the bar plots you can see in the paper (and many more) from thestats
CSV files.plot_scatter.py
is used to generate the scatter plots you can see in the paper from thestats
CSV files.
The scripts assume they are run with Python 3.
The following python packages are required (version numbers indicate tested versions):
matplotlib
v3.3.0pandas
v1.0.0
The required packages are listed in requirements.txt
and
can be installed using
pip3 install -r requirements.txt
This scripts takes the logs from your experiments runs and transforms them into easy to digest CSV files. Two files for each combination of topology, scenario, and fragmentation forwarding variant are generated.
-times.csv
which contains a line for each interest transmitted by the consumer during the experiments, logging its sent time according to providedxtimer
timestamp (seeapp
README) and the reception time of the content chunk if received by the consumer. It also contains columns to describe the experiment setup.-stats.csv
which contains a line for each node participating in the experiments per run logging all scalar stats for that run as well as additional columns describing the experiment setup.
The script takes optionally an unlimited number of arguments. The arguments are names of logs (without preceding path) that should be ignored:
./parse_results.py [blacklisted logs]
DATA_PATH
: (default:./../../results
) Path where the logs to consider are stored.
This script plots the CDF of the time-to-completion for each interest
transmitted by the consumer. It requires the -times.csv
files to take the data
from as arguments:
./plot_cdf.py ../../results/*-times.csv
This script creates bar plots for various scalar stats for each run and
participating node. It requires the -stats.csv
files to take the data
from as arguments:
./plot_stats.py ../../results/*-stats.csv
Optionally, the kind of plotted stats can be restricted using the -s
argument:
./plot_stats.py -s int_retrans,pktbuf ../../results/*-stats.csv
usage: plot_stats.py [-h] [-s [STATS_TO_PLOT]] filenames [filenames ...]
positional arguments:
filenames CSV files as generated by ./parse_results.py to takes
stats from
optional arguments:
-h, --help show this help message and exit
-s [STATS_TO_PLOT], --stat [STATS_TO_PLOT]
Comma separated list of stat to plot. Possible values:
cnt_trans, cs_hits, fbuf_full, frag_fwd, frag_retrans,
int_retrans, pktbuf, vrb_full, rbuf_full. Default: all
This script creates scatter plots for the various scalar stats for each run also
handled in ./plot_stats.py
for a specified node. It requires
the a pair of the desired stats, the node and -stats.csv
files to take the
data from as arguments:
./plot_scatter.py ./plot_scatter.py m3-281 cs_hits vrb_full \
../../results/*-stats.csv
usage: plot_scatter.py [-h] node stat1 stat2 filenames [filenames ...]
positional arguments:
node Node to plot scatter plot for
stat1 Stat for x-axis
stat2 Stat for y-axis
filenames Filenames
optional arguments:
-h, --help show this help message and exit