#[unsafe(no_mangle)]pub extern "C" fn ket_process_read_sample(
process: &mut Process,
sample_json: &mut *const c_char,
) -> i32Expand description
Reads the cached sample data from a Process.
Returns the sample counts recorded during the most recent execution as a
heap-allocated JSON string. If no execution has been performed yet, the
returned JSON string contains null. The caller must free the string
with super::ket_string_delete.
§Parameters
process: The process from which sample data is read.sample_json: Output: set to a pointer to a heap-allocated null-terminated JSON string.
§Returns
0 on success, non-zero error code on failure.