Introduce stats(3), a flexible statistics gathering API.
This provides a framework to define a template describing
a set of "variables of interest" and the intended way for the
framework to maintain them (for example the maximum, orsum,
sum, or a t-digest, or a combination thereof). Afterwards the user
the user code can feed its in the raw data, and the framework maintains
maintains themthese variables inside a user-provided, opaque stats blobs.
ItThe framework also provides a way to selectively extract the information
stats from the blobs. The stats(3) framework can be used both by thein
both userspace code,ce and in the kernel.
See the stats(3) manual page for details.
This will be used by the upcoming TCP statistics gathering code,
This depends on both https://reviews.freebsd.org/D20324the ARB tree macros:
It's disabled for now, except for NOTES; it's expectedand the Q math macros:
The stats(3) framework is disabled by default for now,
except in the NOTES kernel (for QA); it is expected
to be enabled in amd64 GENERIC after a cool down period.
Sponsored By: Klara Inc, Netflix
Obtained from: Netflix