Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
225736ce80 | ||
|
|
4575150f92 | ||
|
|
592d1ef2a3 |
No files matched your search
@@ -41,13 +41,38 @@ impl RevisionExecution {
|
|||||||
revision: u64,
|
revision: u64,
|
||||||
execution: Execution,
|
execution: Execution,
|
||||||
resources: Option<crate::resources::ResourceTrace>,
|
resources: Option<crate::resources::ResourceTrace>,
|
||||||
|
) -> Self {
|
||||||
|
Self::with_previous_sources(revision, execution, resources, None)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn with_previous_sources(
|
||||||
|
revision: u64,
|
||||||
|
execution: Execution,
|
||||||
|
resources: Option<crate::resources::ResourceTrace>,
|
||||||
|
previous: Option<&Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let source_versions = execution
|
let source_versions = execution
|
||||||
.sources
|
.sources
|
||||||
.iter()
|
.iter()
|
||||||
.map(|source| SourceVersion {
|
.enumerate()
|
||||||
|
.map(|(id, source)| {
|
||||||
|
// The previous result was built by this session. Match the
|
||||||
|
// scanned bytes, including generated and stream input.
|
||||||
|
previous
|
||||||
|
.and_then(|old| {
|
||||||
|
old.execution
|
||||||
|
.sources
|
||||||
|
.get(id)
|
||||||
|
.zip(old.source_versions.get(id))
|
||||||
|
})
|
||||||
|
.filter(|(old_source, _)| *old_source == source)
|
||||||
|
.map_or_else(
|
||||||
|
|| SourceVersion {
|
||||||
sha256: format!("{:x}", Sha256::digest(&source.data)),
|
sha256: format!("{:x}", Sha256::digest(&source.data)),
|
||||||
bytes: source.data.len() as u64,
|
bytes: source.data.len() as u64,
|
||||||
|
},
|
||||||
|
|(_, version)| version.clone(),
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
Self {
|
Self {
|
||||||
@@ -166,7 +191,7 @@ impl RevisionJob {
|
|||||||
let executed = executor
|
let executed = executor
|
||||||
.with_cancellation(self.cancellation.clone())
|
.with_cancellation(self.cancellation.clone())
|
||||||
.run_detailed(source, files);
|
.run_detailed(source, files);
|
||||||
self.finish_execution(executed, files)
|
self.finish_execution(executed, files, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Capture selected entry continuations while running the full revision.
|
/// Capture selected entry continuations while running the full revision.
|
||||||
@@ -181,7 +206,7 @@ impl RevisionJob {
|
|||||||
let executed = executor
|
let executed = executor
|
||||||
.with_cancellation(self.cancellation.clone())
|
.with_cancellation(self.cancellation.clone())
|
||||||
.run_capturing_entries(source, files, select, capture);
|
.run_capturing_entries(source, files, select, capture);
|
||||||
self.finish_execution(executed, files)
|
self.finish_execution(executed, files, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resume after the host has validated prefix dependencies and replayed
|
/// Resume after the host has validated prefix dependencies and replayed
|
||||||
@@ -192,9 +217,10 @@ impl RevisionJob {
|
|||||||
source: SourceFile,
|
source: SourceFile,
|
||||||
files: &mut impl SourceProvider,
|
files: &mut impl SourceProvider,
|
||||||
) -> Option<Result<Arc<RevisionExecution>, RevisionFailure>> {
|
) -> Option<Result<Arc<RevisionExecution>, RevisionFailure>> {
|
||||||
|
let previous = self.session.latest();
|
||||||
let executed =
|
let executed =
|
||||||
checkpoint.resume_after_host_replay(source, files, self.cancellation.clone())?;
|
checkpoint.resume_after_host_replay(source, files, self.cancellation.clone())?;
|
||||||
Some(self.finish_execution(executed, files))
|
Some(self.finish_execution(executed, files, previous.as_deref()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resume a verified prefix and observe new boundaries in the executed suffix.
|
/// Resume a verified prefix and observe new boundaries in the executed suffix.
|
||||||
@@ -217,22 +243,24 @@ impl RevisionJob {
|
|||||||
select,
|
select,
|
||||||
capture,
|
capture,
|
||||||
)?;
|
)?;
|
||||||
Some(self.finish_execution(executed, files))
|
Some(self.finish_execution(executed, files, previous.as_deref()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finish_execution(
|
fn finish_execution(
|
||||||
self,
|
self,
|
||||||
executed: Result<Execution, ExecutionFailure>,
|
executed: Result<Execution, ExecutionFailure>,
|
||||||
files: &impl SourceProvider,
|
files: &impl SourceProvider,
|
||||||
|
previous: Option<&RevisionExecution>,
|
||||||
) -> Result<Arc<RevisionExecution>, RevisionFailure> {
|
) -> Result<Arc<RevisionExecution>, RevisionFailure> {
|
||||||
// Host observations can themselves supersede the revision. Do not
|
// Host observations can themselves supersede the revision. Do not
|
||||||
// invoke the host while holding the session publication lock.
|
// invoke the host while holding the session publication lock.
|
||||||
let resources = files.execution_resource_trace().cloned();
|
let resources = files.execution_resource_trace().cloned();
|
||||||
let result = executed.map(|execution| {
|
let result = executed.map(|execution| {
|
||||||
Arc::new(RevisionExecution::from_execution(
|
Arc::new(RevisionExecution::with_previous_sources(
|
||||||
self.revision,
|
self.revision,
|
||||||
execution,
|
execution,
|
||||||
resources.clone(),
|
resources.clone(),
|
||||||
|
previous,
|
||||||
))
|
))
|
||||||
});
|
});
|
||||||
let mut state = self
|
let mut state = self
|
||||||
|
|||||||
@@ -905,6 +905,13 @@ PDF、SVG、来源和 aux 与各自的增量版本一致。
|
|||||||
`full-equivalence-{1,2-resumed}/receipt.json` 的 SHA-256 均为
|
`full-equivalence-{1,2-resumed}/receipt.json` 的 SHA-256 均为
|
||||||
`ec72d40ee6d2ec74a45bcad39000c2c19a9f08024713b2f5fc35c8da49bac207`。
|
`ec72d40ee6d2ec74a45bcad39000c2c19a9f08024713b2f5fc35c8da49bac207`。
|
||||||
|
|
||||||
|
按原补丁合入源指纹复用。完整工作区1627项通过、零失败。
|
||||||
|
暂停前完成100个测试套件,恢复后以原工作区构建配置执行剩余9个
|
||||||
|
集成套件,四个文档测试套件亦通过。两个单独运行的原样 A3 已通过。
|
||||||
|
`target/p4-reuse-source-versions/workspace-exact-resumed/receipt.json`
|
||||||
|
保存113个套件的合计及剩余工作区测试程序的哈希,回执 SHA-256 为
|
||||||
|
`2999f65936487143cb23d6da87419934403de3d79d8a4b0cb92dacae545871c7`。
|
||||||
|
|
||||||
同一个候选和基线分别加载固定出版格式与官方 IEEE Transactions
|
同一个候选和基线分别加载固定出版格式与官方 IEEE Transactions
|
||||||
双栏期刊样例。原始 `bare_jrnl.tex`、`IEEEtran.cls` 和格式的指纹
|
双栏期刊样例。原始 `bare_jrnl.tex`、`IEEEtran.cls` 和格式的指纹
|
||||||
匹配出版矩阵。两次正文编辑分别覆盖同长替换和不同长度替换,每次
|
匹配出版矩阵。两次正文编辑分别覆盖同长替换和不同长度替换,每次
|
||||||
@@ -935,6 +942,63 @@ PDF、SVG、来源和 aux 与各自的增量版本一致。
|
|||||||
来源跨度与绘制索引的校验。不同会话或传入的独立执行结果照常
|
来源跨度与绘制索引的校验。不同会话或传入的独立执行结果照常
|
||||||
逐字节计算指纹。针对相同修订号的独立结果增加验证。
|
逐字节计算指纹。针对相同修订号的独立结果增加验证。
|
||||||
|
|
||||||
|
### 来源映射复用同一会话的已验证结果
|
||||||
|
|
||||||
|
隔离候选用会话当前持有的确切执行结果建立来源映射。会话生成源版本
|
||||||
|
时已计算内容指纹,校验页布局和构造映射时复用这份指纹。外部传入的
|
||||||
|
执行结果仍核对其实际内容,包括相同修订号的独立结果。61项定向和
|
||||||
|
端到端测试通过。
|
||||||
|
|
||||||
|
原样 A4 各24次主文件热编辑的定向采样中,基线559个 CPU 样本中
|
||||||
|
有28个 SHA-256 样本,候选517个中有2个。布局与字体阶段中位数为
|
||||||
|
10.0 → 5.8 ms。采样回执
|
||||||
|
`target/p4-source-map-session-identity/profile-comparison.json`
|
||||||
|
的 SHA-256 为 `885d84dbd19225e48974780904dd9a9a83d71a1cd7d4ab5e7109509e4c3e7992`。
|
||||||
|
|
||||||
|
两轮 Edge 对照每版每轮各30次主文件和30次子文件编辑,第二轮交换
|
||||||
|
测量顺序。配对核对每版的执行及复用步数、页差量、PDF、SVG、来源
|
||||||
|
映射和最终 aux。两轮最终版本均独立零复用全量编译并核对一致。
|
||||||
|
|
||||||
|
| 轮次 | 编辑范围 | 基线可见 p50 / p95 (ms) | 候选可见 p50 / p95 (ms) | 布局与字体阶段 p50 (ms) |
|
||||||
|
| --- | --- | ---: | ---: | ---: |
|
||||||
|
| 1 | 主文件 | 209.3 / 269.3 | 198.8 / 246.7 | 10.3 → 6.5 |
|
||||||
|
| 1 | 子文件 | 189.2 / 240.3 | 179.4 / 241.2 | 9.8 → 6.2 |
|
||||||
|
| 2 | 主文件 | 209.0 / 247.5 | 201.4 / 411.6 | 9.9 → 6.1 |
|
||||||
|
| 2 | 子文件 | 178.3 / 319.2 | 182.6 / 354.0 | 10.0 → 6.0 |
|
||||||
|
|
||||||
|
布局与字体阶段的中位数在两轮都下降3.6至4.0 ms。可见 p95 的
|
||||||
|
变化方向有差异,两轮起始 I/O pressure some avg10 分别为19.67%和
|
||||||
|
42.62%。主文件100 ms门槛仍待达到。候选两轮峰值 RSS 为601460
|
||||||
|
和601832 KiB。浏览器回执
|
||||||
|
`target/p4-source-map-session-identity/edge/run-{1,2}/receipt.json`
|
||||||
|
的 SHA-256 分别为 `c20921e4aed4831123cf95cfd13d24472a5ea29275ad3f44199657b2a7797921`
|
||||||
|
和 `27d3cf03f10596999b9c570022e6fdab8c9dcc434c0cac99a1bdba967af5c577`。
|
||||||
|
两轮独立全量 `full-equivalence-{1,2}/receipt.json` 的 SHA-256 同为
|
||||||
|
`2c73f84608fe5b2cbaf23a2eb0e5ab2d7038078880ec4990e93af303d52c2756`。
|
||||||
|
完整工作区回归已启动。
|
||||||
|
|
||||||
|
对以上两轮各30次主文件编辑按样本拆分可见延迟。候选分别复用
|
||||||
|
558821步,剩余执行约78500步。执行阶段中位数为76.1和76.3 ms,
|
||||||
|
编译就绪中位数为101.9和102.6 ms,编译外耗时中位数为94.7和95.5 ms。
|
||||||
|
请求到首字节扣除已测排队与编译时长后的余量中位数为53.1和55.0 ms。
|
||||||
|
响应完成到观测到画面更新的中位数为32.1和31.0 ms。
|
||||||
|
按每个样本扣除执行阶段后,剩余时间的 p95 为146.2和169.5 ms。
|
||||||
|
该算术分解用于定位下一处要测量的边界。正式门禁仍用原样项目
|
||||||
|
编辑到可见页面的完整耗时。执行阶段继续区分有效 TeX 执行、
|
||||||
|
检查点恢复和再捕获。编译就绪到首字节到达的余量需要区分
|
||||||
|
响应构造、发送调度和传输。原浏览器报告逐份核对 SHA-256。
|
||||||
|
按最近秩聚合的分解回执为
|
||||||
|
`target/p4-source-map-session-identity/edge/critical-path-budget.json`,
|
||||||
|
SHA-256 为 `581a4b15a938f913be07aa4faa056ac0a1678534dd0de168d46ee144700a1914`。
|
||||||
|
|
||||||
|
原样 CVPR 的独立诊断逐版核对了同一初始输入和已验证的五页结果。
|
||||||
|
会话保留5个检查点,前两次子文件编辑的准备阶段明确报告
|
||||||
|
`main.aux` 初始版本不匹配。第三次按已稳定的辅助文件恢复,复用
|
||||||
|
11375833步,只更新第1页。下一步验证较早检查点所实际观察的
|
||||||
|
生成输入,以及在较晚检查点失效时选择较早有效检查点的范围。
|
||||||
|
诊断回执 `target/p4-source-map-session-identity/cvpr-checkpoint-diagnostics/receipt.json`
|
||||||
|
SHA-256 为 `e105a3ed13e2670507a3bdaf550ea55a3eb55489f526c626768a7c870511cc91`。
|
||||||
|
|
||||||
### TeX 输入的默认扩展名候选
|
### TeX 输入的默认扩展名候选
|
||||||
|
|
||||||
默认 TeX 编译在每个搜索目录中为带未知后缀的输入先试附加 `.tex`,并保留
|
默认 TeX 编译在每个搜索目录中为带未知后缀的输入先试附加 `.tex`,并保留
|
||||||
|
|||||||
Reference in new issue
Block a user