Skip to main content

export_async_analysis_json

Function export_async_analysis_json 

Source
pub fn export_async_analysis_json<P: AsRef<Path>>(
    path: P,
    events: &[MemoryEvent],
    task_graph: &TaskGraph,
    async_tracker: &Arc<AsyncTracker>,
) -> MemScopeResult<()>
Expand description

Export async task analysis to JSON

This function rebuilds task profiles from the event stream rather than reading live AsyncTracker state. This ensures the export always sees a consistent, complete snapshot regardless of concurrent tracking activity (no lock contention, no data loss from try_lock failures).