Expand description
s9vm : pure timing and exit-latency measurement.
This module performs no hardware access: every sample is supplied by the caller (time-stamp counter cycles, nanoseconds, or any other monotonic unit) and all computations are integer arithmetic. It can therefore be compiled and exercised on the host.
ยงUnits
Samples are opaque u64 values. A histogram never converts units: the
caller decides whether it records cycles or nanoseconds and must keep the
same unit for every sample recorded in a given histogram. Reporting code is
responsible for the conversion and for remembering the time-stamp counter
frequency.
ยงContents
| Type | Role | Memory |
|---|---|---|
ExitLatencyHistogram | fixed 32-bucket log histogram | ~280 bytes |
ExitRateMeter | total / sliding window / peak counter | ~100 bytes |
WorldTiming | per-exit-class aggregation of both | ~9 KiB |
All counters saturate: a long-running measurement degrades into an imprecise value instead of wrapping or panicking.
Re-exportsยง
use super::exit::ExitClass;๐use super::exit::ExitReason;๐
Structsยง
- Exit
Latency Histogram - Fixed-memory histogram of exit latencies.
- Exit
Rate Meter - Sliding-window counter for exit rates.
- World
Timing - Timing aggregate of one virtual machine, split by exit class.
Constantsยง
- EMPTY_
HISTOGRAM ๐ - Empty histogram, used to initialize the per-class array.
- EMPTY_
RATE_ ๐METER - Empty rate meter, used to initialize the per-class array.
- EXIT_
CLASS_ COUNT - Number of
ExitClassvariants aggregated byWorldTiming. - EXIT_
LATENCY_ BUCKETS - Number of latency buckets in an
ExitLatencyHistogram. - EXIT_
RATE_ WINDOW - Number of slots of an
ExitRateMetersliding window.