Add a new STAT ENABLE/DISABLE feature to skip collecting per-source data #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From looking at perf data, and also our internal timeseries usage, per-source metric data
is expensive to collect, store, and we rarely look at it.
Sometimes it might be useful to collect this, for example when there are few distinct sources,
but I suspect we'll disable these nearly all the time going forward.
This is slightly different from the existing filter feature because
enabling/disabling these applies to all stats output functions. The
filters also don't actually change what is internally collected - i.e.
the work for per-source metrics still shows up in perf with a filter
applied
Disabling these stats make a slight different to
perf report
- a 30 second sample of amqpprox with 5000 connections showsBloomberg::amqpprox::StatCollector::collect
taking ~8% of samples instead of 10%. Several string allocation/free functions also drop further down the perf report.