OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2015 Universita' degli Studi di Napoli "Federico II" | 3 * Copyright (c) 2015 Universita' degli Studi di Napoli "Federico II" |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 bytesDroppedByNetDevice = stats[1].bytesDropped[Ipv4FlowProbe::DROP_QUEUE]
; | 195 bytesDroppedByNetDevice = stats[1].bytesDropped[Ipv4FlowProbe::DROP_QUEUE]
; |
196 } | 196 } |
197 std::cout << " Packets/Bytes Dropped by NetDevice: " << packetsDroppedByNet
Device | 197 std::cout << " Packets/Bytes Dropped by NetDevice: " << packetsDroppedByNet
Device |
198 << " / " << bytesDroppedByNetDevice << std::endl; | 198 << " / " << bytesDroppedByNetDevice << std::endl; |
199 std::cout << " Throughput: " << stats[1].rxBytes * 8.0 / (stats[1].timeLastRx
Packet.GetSeconds () - stats[1].timeFirstRxPacket.GetSeconds ()) / 1000000 << "
Mbps" << std::endl; | 199 std::cout << " Throughput: " << stats[1].rxBytes * 8.0 / (stats[1].timeLastRx
Packet.GetSeconds () - stats[1].timeFirstRxPacket.GetSeconds ()) / 1000000 << "
Mbps" << std::endl; |
200 std::cout << " Mean delay: " << stats[1].delaySum.GetSeconds () / stats[1].
rxPackets << std::endl; | 200 std::cout << " Mean delay: " << stats[1].delaySum.GetSeconds () / stats[1].
rxPackets << std::endl; |
201 std::cout << " Mean jitter: " << stats[1].jitterSum.GetSeconds () / (stats[
1].rxPackets - 1) << std::endl; | 201 std::cout << " Mean jitter: " << stats[1].jitterSum.GetSeconds () / (stats[
1].rxPackets - 1) << std::endl; |
202 auto dscpVec = classifier->GetDscpCounts (1); | 202 auto dscpVec = classifier->GetDscpCounts (1); |
203 for (auto p : dscpVec) | 203 for (auto p : dscpVec) |
204 { | 204 { |
205 std::cout << " DSCP value: 0x" << std::hex << static_cast<uint32_t>(p.f
irst) << std::dec | 205 std::cout << " DSCP value: 0x" << std::hex << static_cast<uint32_t> (p.
first) << std::dec |
206 << " count: "<< p.second << std::endl; | 206 << " count: "<< p.second << std::endl; |
207 } | 207 } |
208 | 208 |
209 Simulator::Destroy (); | 209 Simulator::Destroy (); |
210 | 210 |
211 std::cout << std::endl << "*** Application statistics ***" << std::endl; | 211 std::cout << std::endl << "*** Application statistics ***" << std::endl; |
212 double thr = 0; | 212 double thr = 0; |
213 uint32_t totalPacketsThr = DynamicCast<PacketSink> (sinkApp.Get (0))->GetTotal
Rx (); | 213 uint32_t totalPacketsThr = static_cast<uint32_t> (DynamicCast<PacketSink> (sin
kApp.Get (0))->GetTotalRx ()); |
214 thr = totalPacketsThr * 8 / (simulationTime * 1000000.0); //Mbit/s | 214 thr = totalPacketsThr * 8 / (simulationTime * 1000000.0); //Mbit/s |
215 std::cout << " Rx Bytes: " << totalPacketsThr << std::endl; | 215 std::cout << " Rx Bytes: " << totalPacketsThr << std::endl; |
216 std::cout << " Average Goodput: " << thr << " Mbit/s" << std::endl; | 216 std::cout << " Average Goodput: " << thr << " Mbit/s" << std::endl; |
217 std::cout << std::endl << "*** TC Layer statistics ***" << std::endl; | 217 std::cout << std::endl << "*** TC Layer statistics ***" << std::endl; |
218 std::cout << q->GetStats () << std::endl; | 218 std::cout << q->GetStats () << std::endl; |
219 return 0; | 219 return 0; |
220 } | 220 } |
OLD | NEW |