[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ns] goodput calculation




I've been calclating goodput in my ns script like this:

#######################################################
#  Goodput  Index                                     #
#######################################################
set goodputIndex 0

for {set i 0} {$i < $NODES } {incr i} {
    set goodputIndex [expr pow(double([$tcp_sender($i) set ndatabytes_] - [$tcp_sender($i) set nrexmitbytes_]),2) + $goodputIndex ]
}
    
set goodputIndex [expr pow($totalBytesDelivered, 2) / ($NODES * $goodputIndex )]



#######################################################

$totalBytesDeliverd was calculated somewhere above.
$NODES is the number of nodes

bound variables
-------------------
ndatabytes_ is the bytes sent
and
nrexmitbytes_ are the bytes retransmitted

you can use both those variables to get the bytes received.

Stephan

"Securing a computer system has traditionally been a battle of wits:
the penetrator tries to find holes, and the designer tries to close them."
--- M. Gosser ---

On Wed, 13 Jun 2001, Lloyd Wood wrote:

> On Wed, 13 Jun 2001, Michael Welzl wrote:
> 
> > But this is an upper layer problem. Like, if you do FEC (presumably on
> > top of UDP instead of TCP in real life - why would anybody want to do that
> > on top of TCP?)
> 
> the weak TCP checksum. See current discussion ad nauseum on
> end2end-interest and IETF tsvwg. But FEC on the link layer would
> probably compensate enough...
> 
> > Then, if I'm measuring how much a regular TCP agent gets across, I'm
> > doing the right thing   :)
> 
> you'd better hope so.
> 
> L.
> 
> <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
> 
>