Repository navigation
fix(tools): detect host and title changes in interval digests #10559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,7 +308,8 @@ def digest_intervals(lines): | |
| "top_phase": {"name": largest[0], "ms_per_frame": largest[1]} if largest else None, | ||
| "trace_dropped": line.get("trace_dropped", False)}) | ||
| first = lines[0] if lines else {} | ||
| keys = ("commit", "dirty", "env", "gpu", "driver", "os", "resolution") | ||
| keys = ("commit", "dirty", "env", "gpu", "driver", "os", "resolution", | ||
| "cpu", "cpu_threads", "memory_mib", "title_id", "title", "content_version") | ||
| changed = [index for index in range(1, len(lines)) if any(lines[index].get(key) != lines[index - 1].get(key) for key in keys)] | ||
| return {"intervals": rows, "identity": {key: first.get(key) for key in keys}, "identity_changed_at": changed} | ||
|
|
||
|
|
@@ -322,7 +323,7 @@ def markdown_intervals(result): | |
| f"{identity['gpu']}, {identity['driver']}, {identity['os']}, {identity['resolution']}, commit {identity['commit']}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the header still prints only GPU, driver, OS, resolution and commit, while the warning three lines down now says "host ... or title metadata changed", so a reader of a pasted digest cannot see which CPU, title or content version the trace starts with, or what changed; only |
||
| f"{' (dirty)' if identity.get('dirty') else ''}"] | ||
| if result["identity_changed_at"]: | ||
| lines.append("commit, environment, GPU, driver or OS changed at interval " + ", ".join(str(index + 1) for index in result["identity_changed_at"])) | ||
| lines.append("build, environment, host, resolution or title metadata changed at interval " + ", ".join(str(index + 1) for index in result["identity_changed_at"])) | ||
| lines += ["", "| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |", "|---|---|---|---|---|---|---|---|---|---|"] | ||
| for index, row in enumerate(rows, 1): | ||
| frame = row["frame_ms"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, nothing to change:
resolutionwas already in the key tuple onmain, so this pins existing detection and fails onmainonly because of the new wording (which now names resolution, the old message did not). Fine as a regression guard, just not one of the metadata regressions the body counts.