Skip to main content

Module compiled

Module compiled 

Available on crate features embed-profiles and std and ua only.
Expand description

Precompiled profile sets: analyzed profiles in a compact binary form.

This is the form in which profiles are embedded. Loading decompresses and decodes the analysis computed at export time; nothing is reanalyzed. Ids that follow from stored bytes (profiles, scopes, structures and stored values) are not stored but hashed again at load, so only data produced by Rama’s own export belongs in this format. Archives keep the evidence and are reanalyzed whenever they are loaded.

Only what selection and replay read is kept: scope totals and losses, variant weights, the TLS extension and HTTP/3 SETTINGS order rules, and the samples HTTP/3 SETTINGS replay derives its generators from. Other counters, orders and samples stay in archives.

A value whose bytes already exist elsewhere in the set, such as a component capture also held by a joint capture, is stored once. Loaded values share those bytes instead of each owning a copy. Request and header captures are stored as positions in one field table, and each distinct header capture once. Export loads what it wrote and refuses a set that does not come back exactly.

Constants§

COMPILED_PROFILE_SET_BYTES
Upper bound on a decoded profile set.

Functions§

decode_compiled_profiles
Decode a precompiled profile set produced by encode_compiled_profiles.
encode_compiled_profiles
Encode analyzed profiles, for example from rama ua export --embed.
is_compiled_profile_set
Whether bytes start like a precompiled profile set.
try_load_compiled_profiles
Decode a precompiled profile set into emulation profiles.