Class VisitorTypeRequests
java.lang.Object
org.frontcache.bots.VisitorTypeRequests
Top-level requests by visitor type (the leaf), counted where the type is decided - what the exporter reports as
frontcache_visitor_requests_total{type} (2.13.0).
Top-level only, for the reason the rate limiter has scope=toplevel: a fragment re-entering the engine is the
same visitor again, so counting includes would count a visitor once per fragment of their page. Warm requests are
not visitors and are not counted.
Bounded: a type is counted only once classification gave it, so the names are the roots and the declared types
(at most 16 + 2 at a time); the map keeps a name a reload removed, so its counter
stays monotonic, and refuses a new one past MAX_NAMES - many reloads of many renames - rather than grow.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe most names ever counted in one process. -
Method Summary
-
Field Details
-
MAX_NAMES
public static final int MAX_NAMESThe most names ever counted in one process.- See Also:
-
-
Method Details
-
count
One top-level request of this type. Allocates only the first time a name is seen. -
requests
- Returns:
- the requests counted for the type since the process started, 0 for a name never counted
-
names
-
reset
public static void reset()for tests
-