Thread specific summary counters
This pull request has three minor changes that are so trivial they hopefully do not need much discussion.
Main purpose of the change set is to add -threads=false command-line option support, that will make the thread specific exports to be summary counters. Level of detail is just too much in cases such as a company I work for, where we have lots of threads and lots of installations. That leads to prometheus server to reserve a lot of memory to keep track of these metrics, that are always summarised when visualised. Notice that the default per thread counting is kept as-is, new summary output is only for people who really want to merge the metrics.
Gotcha, here's the old (default) behavior:
root@46dbabba90c5:/golang/unbound-pr-thread# curl -s localhost:9167/metrics | grep -v '#' | grep thread
go_threads 14
unbound_cache_hits_total{thread="0"} 3
unbound_cache_misses_total{thread="0"} 0
unbound_prefetches_total{thread="0"} 0
unbound_queries_total{thread="0"} 3
unbound_recursive_replies_total{thread="0"} 0
unbound_request_list_current_all{thread="0"} 0
unbound_request_list_current_user{thread="0"} 0
unbound_request_list_exceeded_total{thread="0"} 0
unbound_request_list_overwritten_total{thread="0"} 0
and behavior with the new flag
root@46dbabba90c5:/golang/unbound-pr-thread# curl -s localhost:9167/metrics | grep -v '#' | grep thread
go_threads 8
unbound_cache_hits_total{thread="sum"} 3
unbound_cache_misses_total{thread="sum"} 0
unbound_prefetches_total{thread="sum"} 0
unbound_queries_total{thread="sum"} 3
unbound_recursive_replies_total{thread="sum"} 0
unbound_request_list_current_all{thread="sum"} 0
unbound_request_list_current_user{thread="sum"} 0
unbound_request_list_exceeded_total{thread="sum"} 0
unbound_request_list_overwritten_total{thread="sum"} 0