Skip to content

Commit a820594

Browse files
committed
flow-monitor: Put serializable attributes in separate lines
1 parent d9ad698 commit a820594

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/flow-monitor/model/flow-monitor.cc

+18-6
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,24 @@ FlowMonitor::SerializeToXmlStream(std::ostream& os,
439439
os << std::string(indent, ' ');
440440
#define ATTRIB(name) " " #name "=\"" << flowStats.name << "\""
441441
#define ATTRIB_TIME(name) " " #name "=\"" << flowStats.name.As(Time::NS) << "\""
442-
os << "<Flow flowId=\"" << flowId << "\"" << ATTRIB_TIME(timeFirstTxPacket)
443-
<< ATTRIB_TIME(timeFirstRxPacket) << ATTRIB_TIME(timeLastTxPacket)
444-
<< ATTRIB_TIME(timeLastRxPacket) << ATTRIB_TIME(delaySum) << ATTRIB_TIME(jitterSum)
445-
<< ATTRIB_TIME(lastDelay) << ATTRIB_TIME(maxDelay) << ATTRIB_TIME(minDelay)
446-
<< ATTRIB(txBytes) << ATTRIB(rxBytes) << ATTRIB(txPackets) << ATTRIB(rxPackets)
447-
<< ATTRIB(lostPackets) << ATTRIB(timesForwarded) << ">\n";
442+
os << "<Flow";
443+
os << " flowId=\"" << flowId << "\"";
444+
os << ATTRIB_TIME(timeFirstTxPacket);
445+
os << ATTRIB_TIME(timeFirstRxPacket);
446+
os << ATTRIB_TIME(timeLastTxPacket);
447+
os << ATTRIB_TIME(timeLastRxPacket);
448+
os << ATTRIB_TIME(delaySum);
449+
os << ATTRIB_TIME(jitterSum);
450+
os << ATTRIB_TIME(lastDelay);
451+
os << ATTRIB_TIME(maxDelay);
452+
os << ATTRIB_TIME(minDelay);
453+
os << ATTRIB(txBytes);
454+
os << ATTRIB(rxBytes);
455+
os << ATTRIB(txPackets);
456+
os << ATTRIB(rxPackets);
457+
os << ATTRIB(lostPackets);
458+
os << ATTRIB(timesForwarded);
459+
os << ">\n";
448460
#undef ATTRIB_TIME
449461
#undef ATTRIB
450462

0 commit comments

Comments
 (0)