hmm, this looks like a bug to me. However, if you use AverageCounter and the byte_rate handler instead of Counter and the bit_rate handler, it seems to work.
Cliff On Tue, Feb 14, 2012 at 10:46 AM, Ruetee Chitpranee <[email protected]>wrote: > Hi, > > I'm trying to measure bit rate of a source by using* Counter *element's > handler but it's not working (return 0). > Can anybody explain me why? and what should be the solution? Thank you in > advance... > > C:: Counter > > Source -> C -> Discard; > > DriverManager(wait 3s, printn "Bit Rate: ", save C.bit_rate -, stop) > > ELEMENT HANDLERS > > *count (read-only)*Returns the number of packets that have passed through > since the last reset.*byte_count (read-only)*Returns the number of bytes > that have passed through since the last reset.*rate (read-only)*Returns the > recent arrival rate, measured by exponential weighted moving average, in > packets per second.*bit_rate (read-only)*Returns the recent arrival rate, > measured by exponential weighted moving average, in bits per second. > > -- > Ruetee C. > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
