makedelayplot

来自「大名鼎鼎的传感器网络仿真实验室平台SENSE」· 代码 · 共 39 行

TXT
39
字号
#! /bin/bash# Make a graph showing which packets have been successfully delivered.# The x axis is the time of delivery# The y axis is the end-to-end delay for the packet#   The input file doesn't contain information about failed packets.## The input file is the output from the run with VISUAL_ROUTE enabled.if [ $# -ne 1 ]; then    echo "usage: $0 <fileName>"    exit 1;fi# extract source nodes from output fileVRfile=$1.VRif [ ! -e $VRfile ]; then    grep VR $1 > $VRfilefiawk -F\; '{ printf( "%s %s\n", $1, $4)}' $VRfile > tempawk '{ printf( "%f %f\n", $2, $3)}' temp > delay.datrm temp# create the gnuplot command filecat > delay.dem <<EOFset term jpeg medium size 1280, 960set output "${1}-delayPlot.jpg"set key offset xlabel "Delivery time (sec)"set ylabel "End-to-end delay (sec)"#set label "10 lambda, 10 source pairs, 40 seconds" at 250, 24 centerplot "delay.dat" using 1:2 with impulsesEOF# create the plotgnuplot delay.demrm delay.dat delay.dem

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?