Function project_update_info_subscribe

Source
pub fn project_update_info_subscribe(
    project: External<ProjectInstance>,
    aggregation_ms: u32,
    func: JsFunction,
) -> Result<()>
Expand description

Subscribes to lifecycle events of the compilation.

Emits an UpdateMessage::Start event when any computation starts. Emits an UpdateMessage::End event when there was no computation for the specified time (aggregation_ms). The UpdateMessage::End event contains information about the computations that happened since the UpdateMessage::Start event. It contains the duration of the computation (excluding the idle time that was spend waiting for aggregation_ms), and the number of tasks that were executed.

The signature of the func is (update_message: UpdateMessage) => void.