pub fn dump_proto_to_vec() -> Vec<u8> ⓘExpand description
Serialize the current heap profile as a binary pprof profile.proto
Profile message (see google/pprof’s profile.proto),
without holding the profiler lock.
Sample values are pre-scaled the same way Go’s runtime/pprof scales
legacy heap samples (the protomem.go convention: alloc_objects,
alloc_space, inuse_objects, inuse_space, each already corrected
for Poisson sampling bias rather than left for a downstream tool to
rescale). The Mapping table is included, so external symbolizers
need only the binary — no text parsing of a “heap profile:” header or
a MAPPED_LIBRARIES: section. This is the compact, machine-oriented
counterpart to dump_to_vec’s text format, intended for API and
transport use (issue #23) where a pprof-compatible tool consumes
the bytes directly.