Module delay_stats
Expand description
Internal shared API — C++ INNData_ProtoDelay-style local delay statistics.
This lives in futu-core so public TCP surfaces and backend request paths
can record into one process-wide store without forcing lower-level network
crates to depend on futu-backend.
C++ INNData_ProtoDelay-style local delay statistics.
The request/reply statistic needs to observe both public API dispatch and
backend request spans. Public API dispatch is wired from futu-server,
while backend spans are wired in BackendConn::request_with_reserved_timeout.
Keeping this store in futu-core avoids a dependency from futu-server back
to the whole backend crate while preserving one process-wide stats store.
Structs§
- Delay
Statistics Item Snapshot - Place
Order Statistics Snapshot - QotPush
Statistics Snapshot - ReqReply
Statistics Snapshot
Constants§
Functions§
- record_
place_ order_ request - Attach successful
Trd_PlaceOrderuser data to the current API request. Calls outsidewith_api_requestare intentionally no-op. - record_
place_ order_ update_ push - Record one
Trd_UpdateOrderpush candidate for PlaceOrder update-cost statistics. - record_
qot_ push_ count - set_
time_ adjustment - Update the server-to-client clock correction used by QOT push delay statistics.
- snapshot_
place_ order_ statistics - snapshot_
qot_ push_ statistics - snapshot_
req_ reply_ statistics - trace_
backend_ request - Record a backend request span for the API request currently executing on
this Tokio task. Calls outside public API dispatch are intentionally no-op,
matching C++’s explicit
ReqReply_RelatedAPISvrReqlinking model. - with_
api_ request - Run a public API handler inside the current request/reply delay context.