Commit 8ea8ab0f authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Log less frequently requested parameter combinations.

Implements the first part of #26919, which is to find out whether the
"fingerprint" parameter is used at all.
parent f7f08b80
......@@ -10,6 +10,10 @@
- Support a comma-separated list of AS numbers in the "as"
parameter.
* Minor changes
- Extend internal statistics to log less frequently requested
resources and parameter combinations without counts.
# Changes in version 6.1-1.15.0 - 2018-07-16
......
......@@ -43,17 +43,20 @@ class MostFrequentString {
StringBuilder sb = new StringBuilder();
int stringsToAdd = 3;
int written = 0;
SortedSet<String> remainingStrings = new TreeSet<>();
for (Map.Entry<Integer, SortedSet<String>> e :
sortedFrequencies.entrySet()) {
for (String string : e.getValue()) {
if (stringsToAdd-- > 0) {
sb.append((written++ > 0 ? ", " : "") + string + " ("
+ e.getKey() + ")");
} else {
remainingStrings.add(string);
}
}
if (stringsToAdd == 0) {
break;
}
}
for (String string : remainingStrings) {
sb.append(", ").append(string);
}
return sb.toString();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment