ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 1546] New: Statistics routine stats_tree_get_strs_from_nod

Date: Fri, 20 Apr 2007 03:05:03 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1546

           Summary: Statistics routine stats_tree_get_strs_from_node in
                    (stats_tree.c) use milliseconds to calculate Rate
           Product: Wireshark
           Version: 0.99.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Medium
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: jlhm@xxxxxxx


Build Information:
Normal 0.99.5 source with no modifications.
--
The calculation of the rate divide the node->counter with
(float)node->st->elapsed. The problem is that the st->elapsed is the time in
milli seconds.

I, at least, expect the rate to be rate/s so correct code should be:

f = ((float)node->counter) / ((float)node->st->elapsed / 1000);

to convert st->elapsed to seconds.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.