Skip to main content

Module upload_probe

Module upload_probe 

Source
Expand description

Upload instrumentation and experimental upload strategies (enabled via RANIM_PROFILE_UPLOAD). Lightweight upload instrumentation for the queue.write_buffer paths, recording bytes / calls / CPU time per buffer label. Enabled via RANIM_PROFILE_UPLOAD=1 (or set_mode at runtime, e.g. from the preview profiler panel); a no-op (one atomic read per upload) unless enabled.

This is the stable counting core. Experimental upload strategies (skip-identical / dirty-range uploads) live on a separate branch and extend this module.

Structsยง

Counters ๐Ÿ”’
UploadStats
Snapshot of the counters accumulated since the last take_stats.

Enumsยง

UploadMode
Upload instrumentation mode, seeded from RANIM_PROFILE_UPLOAD and runtime-switchable via set_mode.

Staticsยง

MODE ๐Ÿ”’
u8::MAX marks โ€œnot seeded from the environment yetโ€.
MODE_SEEDED ๐Ÿ”’

Functionsยง

label_or ๐Ÿ”’
mode
The process-wide upload mode (seeded from RANIM_PROFILE_UPLOAD on first use, overridable at runtime via set_mode).
record ๐Ÿ”’
Record one upload for label.
registry ๐Ÿ”’
set_mode
Switch the process-wide upload mode at runtime (takes effect for uploads after this call).
take_stats
Take and reset the accumulated stats, per buffer label.