processing time

Hello,
I need to know how long a packet is processed by the router. When the packet arrives the router and when this packet leaves the router. How can I count it by a script with saving data to a file? Have you any experience in this subject? There is any documentation for similar problems?

Thank you.

As far I’ve been testing the ROS scripting capabilities - it is slow as molasses and it will consume too much CPU time even for these simple functions it may perform. As long as there is no JIT or some other script to binary compilation involved, no script trickery will make your measurements valid.

Thank you very much for your reply. It is sad news. These functionalities should to be light for OS. I was thinking that OS programmers use it to system evaluations during their work under OS creation and they have light methods…

I need to calculate different advanced network statistics. What do you advise for me?

Check the SNMP or the ROS API capabilities. These are likely expose your properties more or less at native speeds and do your calculations off the box. If nothing less then these measurements will be much more accurate than doing all that with the ROS scripting.