[Click] Changing Counter element to also measure bit rate

Beyers Cronje bcronje at gmail.com
Sat Jun 16 11:30:52 EDT 2007


Hi Samuel,

The attached simple BWCounter element works out bit rate over 5 second
intervals. It is not accumulative, so each interval rate is only calculated
for that interval. I'm sure there are much more advanced and accurate
methods to use but for my purposes this was sufficient.

You might also want to have a look at <clickdir>/include/gaprate.hh

Cheers

Beyers

On 6/15/07, Samuel <samufuentes at gmail.com> wrote:
>
> Hi,
>
> I was interested in measuring the bit rate and not only the packet
> rate with the Counter element. I was thinking about programming it,
> but wanted to ask first in case it has been done, or it is not
> achievable. I imagine I am not the first one to think about it and
> perhaps someone has some views on how to get it or even some code. Has
> anyone any patches to do it? Is it perhaps doable with another element
> which I missed? Any useful ideas on program to do it, perhaps?
>
> Thanks in advance,
> Samu
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bwcounter.hh
Type: text/x-c++hdr
Size: 530 bytes
Desc: not available
Url : https://pdos.csail.mit.edu/pipermail/click/attachments/20070616/d312fc03/bwcounter.hh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bwcounter.cc
Type: text/x-c++src
Size: 777 bytes
Desc: not available
Url : https://pdos.csail.mit.edu/pipermail/click/attachments/20070616/d312fc03/bwcounter.cc


More information about the click mailing list