pub struct RustcInputPrediction {
pub version: u8,
pub inputs: Vec<String>,
pub environment: Vec<String>,
pub compiler_duration_ns: u64,
pub compiler_cpu_ns: u64,
pub crate_name: String,
pub prefetch_group: String,
}Expand description
Normalized input names from the last successful execution of one modeled rustc invocation.
Fields§
§version: u8Prediction schema version.
inputs: Vec<String>Normalized input paths observed during the successful invocation.
environment: Vec<String>Names of environment variables read by the compilation.
compiler_duration_ns: u64Compiler wall time from the successful invocation that produced this prediction. Zero means no timing hint was recorded.
compiler_cpu_ns: u64User and system CPU time of that invocation’s compiler process tree. Zero means it was not measured. Recorded from version 6.
crate_name: StringCrate name associated with the timing hint.
prefetch_group: StringBuild settings group from RustcInvocation::prefetch_group, which
selects the predictions a build prefetches together. Recorded from
version 5; empty before it.
Implementations§
Source§impl RustcInputPrediction
impl RustcInputPrediction
Sourcepub fn with_prefetch_group(&self, group: String) -> Option<Self>
pub fn with_prefetch_group(&self, group: String) -> Option<Self>
This prediction re-recorded at the current version with group, when
it was restored from an older version whose inputs mean the same thing
at the current one. Versions 3 and 4 differ from it only in how inputs
are encoded on the wire. Version 2 read every input as a plain path, so
it converts unless an input carries the native-directory prefix that
version 3 gave a meaning. Anything else gets None.
Sourcepub fn discover(
&self,
working_dir: &Path,
path_mappings: &[PathMapping],
digests: &dyn FileDigestCache,
) -> Result<DiscoveredInputs, BypassReason>
pub fn discover( &self, working_dir: &Path, path_mappings: &[PathMapping], digests: &dyn FileDigestCache, ) -> Result<DiscoveredInputs, BypassReason>
Rehash the predicted paths and read the current environment. The caller still recomputes the full action digest, so changed inputs are misses.