pub fn generate_diff(
baseline: &Profile,
target: &Profile,
) -> Result<DiffReport, DiffError>Expand description
Generate a complete diff report comparing two profiles
§Arguments
baseline- The baseline profile to compare againsttarget- The target profile to compare
§Returns
Complete DiffReport with all deltas calculated
§Errors
DiffError::IncompatibleVersions- If schema versions don’t match
§Example
ⓘ
use stylus_trace_core::diff::generate_diff;
use stylus_trace_core::output::json::read_profile;
let baseline = read_profile("baseline.json")?;
let target = read_profile("target.json")?;
let diff = generate_diff(&baseline, &target)?;