Reduce macro copying during native suffix convergence
This commit is contained in:
1 parent
57c05d9635
commit
c008c52964
9 files changed
+228
-110
No files matched your search
@@ -27,6 +27,7 @@ use std::{
|
||||
collections::BTreeMap,
|
||||
path::{Path, PathBuf},
|
||||
sync::{Arc, Mutex},
|
||||
time::Duration,
|
||||
};
|
||||
pub use texrra_tex_core::resources::{ProjectDefinition, ProjectSnapshot, ProjectVersion};
|
||||
pub use texrra_tex_core::resources::{WorldFailure, WorldObservation};
|
||||
@@ -94,12 +95,30 @@ pub enum CompileStage {
|
||||
Exported,
|
||||
ReadyToPublish,
|
||||
}
|
||||
/// Elapsed work while resuming a native checkpoint after prefix replay.
|
||||
/// The callback slices are disjoint and included in `resume`.
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub struct CheckpointTimings {
|
||||
/// Restoring the executor, running new commands, observing checkpoints,
|
||||
/// and finishing the revision's kernel result.
|
||||
pub resume: Duration,
|
||||
pub capture: Duration,
|
||||
pub suffix_host_validation: Duration,
|
||||
pub suffix_kernel_validation: Duration,
|
||||
pub suffix_host_replay: Duration,
|
||||
/// Collecting the retained checkpoint set after the resumed run.
|
||||
pub retain: Duration,
|
||||
}
|
||||
|
||||
/// Called outside the publication lock. An observer can request a new
|
||||
/// revision or fail without publishing this result. Start/cancel are allowed;
|
||||
/// schedule compilation after the callback returns, rather than recursing.
|
||||
pub trait CompileObserver: Send + Sync {
|
||||
fn stage(&self, revision: u64, stage: CompileStage) -> Result<(), String>;
|
||||
|
||||
/// Observe the work of a resumed native revision before layout begins.
|
||||
fn checkpoint_timings(&self, _revision: u64, _timings: CheckpointTimings) {}
|
||||
|
||||
/// Called for a completed native draft before its staged files are synced
|
||||
/// and installed. The caller can display these pages provisionally. The
|
||||
/// compile result determines whether this revision actually published.
|
||||
|
||||
Reference in new issue
Block a user