Crate futures_diagnose

Source
Expand description

Wraps around futures and profiles them.

§Usage

futures::executor::block_on(futures_diagnose::diagnose("task-name", async move {
    // ...
}))

Wrap all your futures into futures_diagnose::diagnose. Then launch your program with the PROFILE_DIR environment variable set to a path name. CPU profiling will automatically be performed and JSON files written in the target directory.

You can open the JSON files using the Chrome browser by opening the address chrome://tracing.

Modules§

prelude

Structs§

DiagSpawn
Wraps around a T and provides lots of diagnostics about tasks spawned through it.
DiagnoseFuture
Wraps around Future and adds diagnostics to it.

Traits§

Future01Ext
Extension trait on Futures.
FutureExt
Extension trait on Futures.

Functions§

diagnose
Wraps around a Future and adds diagnostics.