📄 record-cbr-20.tcl
字号:
proc record0 {} { global ns_ null_ tcpbdeparturespre0 tcpthroughputxg0 interval set now [$ns_ now] set tcpbdepartures [$null_(0) set bytes_ ] set tcpthroughput [expr $tcpbdepartures -$tcpbdeparturespre0] puts $tcpthroughputxg0 "$now [expr $tcpthroughput*8/$interval/1024]" set tcpbdeparturespre0 $tcpbdepartures $ns_ at [expr $now+$interval] "record0"}proc record1 {} { global ns_ null_ tcpbdeparturespre1 tcpthroughputxg1 interval set now [$ns_ now] set tcpbdepartures [$null_(1) set bytes_ ] set tcpthroughput [expr $tcpbdepartures -$tcpbdeparturespre1] puts $tcpthroughputxg1 "$now [expr $tcpthroughput*8/$interval/1024]" set tcpbdeparturespre1 $tcpbdepartures $ns_ at [expr $now+$interval] "record1"}proc record2 {} { global ns_ null_ tcpbdeparturespre2 tcpthroughputxg2 interval set now [$ns_ now] set tcpbdepartures [$null_(2) set bytes_ ] set tcpthroughput [expr $tcpbdepartures -$tcpbdeparturespre2] puts $tcpthroughputxg2 "$now [expr $tcpthroughput*8/$interval/1024]" set tcpbdeparturespre2 $tcpbdepartures $ns_ at [expr $now+$interval] "record2"}proc put_throughput {} { global ns_ val null_ set tcpbdepartures [$null_(0) set bytes_ ] puts [expr $tcpbdepartures*8/$val(stop)/1024] set tcpbdepartures [$null_(1) set bytes_ ] puts [expr $tcpbdepartures*8/$val(stop)/1024] set tcpbdepartures [$null_(2) set bytes_ ] puts [expr $tcpbdepartures*8/$val(stop)/1024] }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -