Skip to content

Commit

Permalink
Ordering the HTTP method stats based on
Browse files Browse the repository at this point in the history
the amount of packets
  • Loading branch information
jpcofr committed Sep 27, 2023
1 parent f207332 commit 14640d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/HttpAnalyzer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void printMethods(const HttpRequestStats& reqStatscollector)
std::vector<std::pair<pcpp::HttpRequestLayer::HttpMethod, int>> map2vec(reqStatscollector.methodCount.begin(), reqStatscollector.methodCount.end());
std::sort(map2vec.begin(), map2vec.end(),
[](const std::pair<pcpp::HttpRequestLayer::HttpMethod, int>& left,
const std::pair<pcpp::HttpRequestLayer::HttpMethod, int>& right) { return left.first > right.first; });
const std::pair<pcpp::HttpRequestLayer::HttpMethod, int>& right) { return left.second > right.second; });
// go over the method count table, print each method and the aggregated figure
for (auto iter : map2vec)
{
Expand Down

0 comments on commit 14640d8

Please sign in to comment.