Skip to main content

Module delay_stats

Module delay_stats 

Source
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§

DelayStatisticsItemSnapshot
PlaceOrderStatisticsSnapshot
QotPushDelaySample
QotPushStatisticsSnapshot
ReqReplyStatisticsSnapshot

Enums§

QotPushDelayRecordOutcome

Constants§

QOT_PUSH_TYPE_BROKER
QOT_PUSH_TYPE_ORDER_BOOK
QOT_PUSH_TYPE_PRICE
QOT_PUSH_TYPE_TICKER

Functions§

qot_push_max_server_recv_time_ms
Select the server recv time used for QOT push delay statistics.
qot_push_should_sample_delay
Decide whether a QOT push should contribute to delay statistics.
record_place_order_request
Attach successful Trd_PlaceOrder user data to the current API request. Calls outside with_api_request are intentionally no-op.
record_place_order_update_push
Record one Trd_UpdateOrder push candidate for PlaceOrder update-cost statistics.
record_qot_push_count
record_qot_push_count_if_sampled
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_RelatedAPISvrReq linking model.
with_api_request
Run a public API handler inside the current request/reply delay context.