📄 compute_avg_metrics.sh
字号:
#!/bin/csh -fset max_nodes = 50set increment = 2set nodes = 2#set name_file = basic_EDCF#set name_file = ni_adaptive+PF#set name_file = ni_adaptive#set name_file = lamia_adaptive+PF#set name_file = lamia_adaptive#set name_file = slow_decrease#set name_file = slow_decreas+PF#set name_file = per-classe+CWdelta+PF#set name_file = per-classe+CWdelta#set name_file = per-classe+CWdelta+PF+condition#set name_file = lamia_adaptive+diff-PF#set name_file = total_coll_rateset name_file = slow_decreas-8+PFset gfile = $name_file.goodputset latfile = $name_file.latset bwfile = $name_file.bwset lowbwfile = $name_file.lowbwset lowbw1file = $name_file.lowbw1set chfile = $name_file.chrm -f $gfiletouch $gfilerm -f $latfiletouch $latfilerm -f $bwfiletouch $bwfilerm -f $lowbwfiletouch $lowbwfilerm -f $lowbw1filetouch $lowbw1filerm -f $chfiletouch $chfileecho "#nodes channel_use collision_rate " >> $chfile while ( $nodes <= $max_nodes ) rm -f "mean.dat" touch "mean.dat" rm -f "mean-bw.dat" touch "mean-bw.dat" rm -f "mean-lowbw.dat" touch "mean-lowbw.dat" rm -f "mean-lowbw1.dat" touch "mean-lowbw1.dat" #ns lamia_test1.tcl scen_heterogen.tcl $nodes #ns ni_test1.tcl scen_heterogen.tcl $nodes 5000 80 #ns ni_test1.tcl test_three.tcl $nodes 5000 80 ns lamia_test1.tcl test_three.tcl $nodes #set goodput = `wlan-goodput-normal scen_heterogen.tcl 0.5` set goodput = `wlan-goodput-normal test_three.tcl 0.5` echo "$nodes $goodput " >> $gfile set lowflow = $nodes @ lowflow1 = $nodes + $nodes #echo "$lowflow1 " set flow = 0 set lat_flow = 0 set bw_flow = 0 set bw_lowflow = 0 set bw_lowflow1 = 0 while ( $flow < $nodes ) #set lat_flow = `wlan-lat-mean scen_heterogen.tcl $flow AGT ` set lat_flow = `wlan-lat-mean test_three.tcl $flow AGT ` echo "$lat_flow" >> mean.dat #set bw_flow = `wlan-bw-mean scen_heterogen.tcl $flow 0.5 ` set bw_flow = `wlan-bw-mean test_three.tcl $flow 0.5 ` echo "$bw_flow" >> mean-bw.dat #set bw_lowflow = `wlan-bw-mean scen_heterogen.tcl $lowflow 0.5 ` set bw_lowflow = `wlan-bw-mean test_three.tcl $lowflow 0.5 ` echo "$bw_lowflow" >> mean-lowbw.dat set bw_lowflow1 = `wlan-bw-mean test_three.tcl $lowflow1 0.5 ` echo "$bw_lowflow1" >> mean-lowbw1.dat @ flow = $flow + 1 @ lowflow = $lowflow + 1 @ lowflow1 = $lowflow1 + 1 end set meandelay = `compute-mean mean.dat $nodes` set meanbw = `compute-mean mean-bw.dat $nodes` set meanlowbw = `compute-mean mean-lowbw.dat $nodes` set meanlowbw1 = `compute-mean mean-lowbw1.dat $nodes` echo "$nodes $meandelay " >> $latfile echo "$nodes $meanbw " >> $bwfile echo "$nodes $meanlowbw " >> $lowbwfile echo "$nodes $meanlowbw1 " >> $lowbw1file #set channel_results = `wlan-chutil-load scen_heterogen.tcl` set channel_results = `wlan-chutil-load test_three.tcl` echo "$nodes $channel_results " >> $chfile @ nodes = $nodes + $increment endcompute-diff-goodput $name_file.goodput basic_EDCF.goodput Gain-$name_filecompute-bw-normal $name_file.lowbw $name_file.lowbwn 125.168747 compute-bw-normal $name_file.bw $name_file.bwn 7.835compute-bw-normal $name_file.lowbw1 $name_file.lowbw1n 15.653000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -