Bug 1592 - Parsing bug in FlowMonitor example script
Parsing bug in FlowMonitor example script
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: flow-monitor
ns-3.16
Other Linux
: P5 minor
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-21 13:56 UTC by Eric Hein
Modified: 2013-12-15 03:04 UTC (History)
3 users (show)

See Also:


Attachments
patch implementing the suggestion (1.71 KB, patch)
2013-12-14 05:15 UTC, Tommaso Pecorella
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Hein 2013-02-21 13:56:24 UTC
src/flow-monitor/examples/flowmon-parse-results.py

This example script nicely parses XML output from a FlowMonitor. While parsing, it strips off the last two characters of time values to convert them into a long data type, assuming that they end in ".0". They actually end in ".0ns", so the script fails as written. I replaced "[:-2]" with "[:-4]" and it worked.
Comment 1 Tommaso Pecorella 2013-12-14 05:15:18 UTC
Created attachment 1736 [details]
patch implementing the suggestion

Indeed, the reporter is right
Comment 2 Tommaso Pecorella 2013-12-14 05:20:17 UTC
+1. Shall I attribute the push to Eric Hein ?
Comment 3 Tom Henderson 2013-12-15 02:05:17 UTC
(In reply to Tommaso Pecorella from comment #2)
> +1. Shall I attribute the push to Eric Hein ?

Yes, in the past we have sometimes added a parenthetical attribution in the commit statement for someone who suggests a small fix, e.g. "Parsing bug in FlowMonitor example script (fix suggested by Eric Hein)"
Comment 4 Tommaso Pecorella 2013-12-15 03:04:12 UTC
Pushed in changeset 10526:a69d7ca6e5b4