Class DataQueryCollector
InteractionCollector cannot see these. It hangs off the RPC events,
and the invocation that triggers a load only registers a flush, so a combo
box that takes four seconds to fetch a page ends its invocation in
microseconds and never qualifies as a slow interaction. This collector
watches the queries themselves.
The budget is the same InteractionCollector.UX_BUDGET_MS an
interaction is measured against: a query is part of what the user waits for,
so it earns attention at the same point.
Threading. The events of one query arrive on the same thread, so the start time lives in a thread local. Count and fetch keep separate slots because an asynchronous component runs its fetches on its own executor while its counts stay on the request thread.
The same thread local carries the DatabaseActivity tally taken when
the query started, so each captured query also reports the SQL work that
answering it took — the difference between a page that came out of one query
and one that came out of sixty thousand, which the row counts alone cannot
show.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registrationregister(com.vaadin.flow.server.VaadinServiceEventBus eventBus) Subscribes to the data query events on the given bus.
-
Constructor Details
-
DataQueryCollector
-
-
Method Details
-
register
public com.vaadin.flow.shared.Registration register(com.vaadin.flow.server.VaadinServiceEventBus eventBus) Subscribes to the data query events on the given bus.- Parameters:
eventBus- the service event bus to listen on- Returns:
- a handle removing every subscription made here
-