From 14640d86aa294ffec3b22fbe619a7f81b264c703 Mon Sep 17 00:00:00 2001 From: Juan Pablo Contreras Franco Date: Wed, 27 Sep 2023 20:25:17 +0200 Subject: [PATCH] Ordering the HTTP method stats based on the amount of packets --- Examples/HttpAnalyzer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/HttpAnalyzer/main.cpp b/Examples/HttpAnalyzer/main.cpp index 7e2f3202d7..1e72ebb03e 100644 --- a/Examples/HttpAnalyzer/main.cpp +++ b/Examples/HttpAnalyzer/main.cpp @@ -172,7 +172,7 @@ void printMethods(const HttpRequestStats& reqStatscollector) std::vector> map2vec(reqStatscollector.methodCount.begin(), reqStatscollector.methodCount.end()); std::sort(map2vec.begin(), map2vec.end(), [](const std::pair& left, - const std::pair& right) { return left.first > right.first; }); + const std::pair& right) { return left.second > right.second; }); // go over the method count table, print each method and the aggregated figure for (auto iter : map2vec) {