Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<AggrPacket> PacketParser::getAggrPackets(const string &aggrKey) {
- 21
- 20 vector<AggrPacket> tmp;
- 19
- 18 for ( auto &pa : _packets ) {
- 17 bool f = false;
- 16 for ( auto &p : tmp ) {
- 15 if ( p.aggrKeyValue == pa->getAggregationValue(aggrKey) ) {
- 14 p.byteSum += pa->getLength();
- 13 p.packetSum++;
- 12 f = true;
- 11 break;
- 10 }
- 9 }
- 8 if ( !f ) {
- 7 tmp.push_back( AggrPacket(pa->getAggregationValue(aggrKey)) );
- 6 tmp.back().packetSum = 1;
- 5 tmp.back().byteSum = pa->getLength();
- 4 }
- 3 }
- 2
- 1 return tmp;
- 400 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement