Record independent ray geometry results and disclose excluded CLI frames

This commit is contained in:
Ludovic Marie
2026-10-04 03:42:11 +02:00
parent 7cbe37b605
commit 349724b3b6
5 changed files with 132 additions and 2 deletions
@@ -0,0 +1,57 @@
{
"schema": 1,
"platform": "Linux-6.17.0-1022-azure-x86_64-with-glibc2.39",
"architecture": "x86_64",
"minecraft": "26.3",
"entity_culling": "1.11.2",
"original_mod_sha256": "7351b417fc83460def5947636444413874ee812e949342f091ef03674e0c0e58",
"results": [
{
"enabled": false,
"public_boxes": 12800,
"provider_reads": 105239,
"edge_rays": 2197,
"visibility_digest": "da7286327283ce854dca2ab798d97c3b1cde55ac67112bd231c48df6d9388e00",
"query_digest": "124074ad764ab680b93896d47fa347a15f0b17ef41d2f8af5bd8e75f75208e12",
"intersection_digest": "f311c0b608b44b9eab2bb1e6347c3e18b003d05c939a8fbea9ba81fb16c8e8ae",
"allocated_bytes": 1040,
"cpu_ns": 101807697,
"wall_ns": 162651689,
"measured_checks": 2000000,
"checksum": 0,
"input_unchanged": true,
"scratch_ownership_checked": true
},
{
"enabled": true,
"public_boxes": 12800,
"provider_reads": 105239,
"edge_rays": 2197,
"visibility_digest": "da7286327283ce854dca2ab798d97c3b1cde55ac67112bd231c48df6d9388e00",
"query_digest": "124074ad764ab680b93896d47fa347a15f0b17ef41d2f8af5bd8e75f75208e12",
"intersection_digest": "f311c0b608b44b9eab2bb1e6347c3e18b003d05c939a8fbea9ba81fb16c8e8ae",
"allocated_bytes": 920,
"cpu_ns": 118540489,
"wall_ns": 235470173,
"measured_checks": 2000000,
"checksum": 0,
"input_unchanged": true,
"scratch_ownership_checked": true
}
],
"notes": [
"Actual upstream culling methods inside Fabric; private fixture invokers do not enter production packs.",
"Two interleaved instances and several occluder patterns; matching boolean and query digests.",
"Signed zero, tiny/large values, infinities and NaN are exercised directly in ray intersection.",
"Unchanged input vectors, independent instance scratch and upstream arithmetic values are checked.",
"Allocation and CPU are single warmed caller-loop observations; JIT folding can vary.",
"Not a game FPS, visual-equivalence proof, whole-game RAM or Mac GPU benchmark."
],
"provenance": {
"source_commit": "7cbe37b60594fb1631bc308f126d7925c4264a18",
"command": "python tools/test_culling_rays.py",
"workflow_run": "https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37168352974",
"job": "portable-mod (ubuntu-latest)",
"artifact": "horizon-ubuntu-latest"
}
}
@@ -0,0 +1,54 @@
{
"schema": 1,
"platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43",
"architecture": "x86_64",
"minecraft": "26.3",
"entity_culling": "1.11.2",
"original_mod_sha256": "7351b417fc83460def5947636444413874ee812e949342f091ef03674e0c0e58",
"results": [
{
"enabled": false,
"public_boxes": 12800,
"provider_reads": 105239,
"edge_rays": 2197,
"visibility_digest": "da7286327283ce854dca2ab798d97c3b1cde55ac67112bd231c48df6d9388e00",
"query_digest": "124074ad764ab680b93896d47fa347a15f0b17ef41d2f8af5bd8e75f75208e12",
"intersection_digest": "f311c0b608b44b9eab2bb1e6347c3e18b003d05c939a8fbea9ba81fb16c8e8ae",
"allocated_bytes": 24318096,
"cpu_ns": 166989515,
"wall_ns": 239648128,
"measured_checks": 2000000,
"checksum": 0,
"input_unchanged": true,
"scratch_ownership_checked": true
},
{
"enabled": true,
"public_boxes": 12800,
"provider_reads": 105239,
"edge_rays": 2197,
"visibility_digest": "da7286327283ce854dca2ab798d97c3b1cde55ac67112bd231c48df6d9388e00",
"query_digest": "124074ad764ab680b93896d47fa347a15f0b17ef41d2f8af5bd8e75f75208e12",
"intersection_digest": "f311c0b608b44b9eab2bb1e6347c3e18b003d05c939a8fbea9ba81fb16c8e8ae",
"allocated_bytes": 920,
"cpu_ns": 149367051,
"wall_ns": 165549458,
"measured_checks": 2000000,
"checksum": 0,
"input_unchanged": true,
"scratch_ownership_checked": true
}
],
"notes": [
"Actual upstream culling methods inside Fabric; private fixture invokers do not enter production packs.",
"Two interleaved instances and several occluder patterns; matching boolean and query digests.",
"Signed zero, tiny/large values, infinities and NaN are exercised directly in ray intersection.",
"Unchanged input vectors, independent instance scratch and upstream arithmetic values are checked.",
"Allocation and CPU are single warmed caller-loop observations; JIT folding can vary.",
"Not a game FPS, visual-equivalence proof, whole-game RAM or Mac GPU benchmark."
],
"provenance": {
"source_commit": "7cbe37b60594fb1631bc308f126d7925c4264a18",
"command": "python tools/test_culling_rays.py"
}
}
+9 -2
View File
@@ -37,8 +37,15 @@ with the original constructors versus 920 with scratch reuse. Single caller CPU
observations were about 167 versus 149 ms. Another unchanged run allocated only
6,259,360 bytes, illustrating how JIT compilation and escape analysis vary during
these loops. No fixed per-check allocation or statistical speedup is inferred.
This is not a whole-game FPS/RAM or Mac GPU benchmark; repeated real hardware
comparisons and live allocation profiles are required.
The independent Linux CI run allocated only 1,040 bytes upstream versus 920
with scratch reuse, and its caller CPU observation was about 102 versus 119 ms.
That run provides no useful allocation reduction and is slower in this loop.
The hook therefore stays isolated and disabled in every recommended profile.
Raw [local](../benchmarks/culling-rays-2026-10-04/local-applied-hooks.json) and
[CI](../benchmarks/culling-rays-2026-10-04/linux-applied-hooks.json) observations
include source and workflow provenance. This is not a whole-game FPS/RAM or Mac
GPU benchmark; repeated real hardware comparisons and live allocation profiles
are required.
The factory hook follows the upstream [Mixin constructor redirect contract](https://github.com/SpongePowered/Mixin/blob/master/src/main/java/org/spongepowered/asm/mixin/injection/Redirect.java).
Compilation uses a checksum-verified publisher JAR; the release mod contains only
+10
View File
@@ -188,6 +188,16 @@ class ComparisonTests(unittest.TestCase):
with self.assertRaises(ValueError):
compare_benchmarks.compare(self.report(), other)
def test_excluded_frames_disclose_that_process_counters_cover_inactive_time(self):
baseline = self.report()
candidate = copy.deepcopy(baseline)
candidate["excluded_frames"] = 28
result = compare_benchmarks.compare(baseline, candidate)
self.assertEqual(result["mismatches"], [])
self.assertTrue(any("candidate excluded 28" in warning and "Process CPU still spans" in warning
for warning in result["warnings"]))
self.assertFalse(any("baseline excluded" in warning for warning in result["warnings"]))
def test_jvm_experiment_warns_without_rejecting_an_intentional_change(self):
baseline = self.report()
baseline.update(compact_object_headers=False, garbage_collectors=["G1 Young Generation"])
+2
View File
@@ -50,6 +50,8 @@ def compare(baseline, candidate):
for name, report in [("baseline", baseline), ("candidate", candidate)]:
if report.get("dropped_samples", 0):
warnings.append(f"{name} exceeded the recording buffer: {report['dropped_samples']} dropped samples.")
if report["kind"] == "frames" and report.get("excluded_frames", 0):
warnings.append(f"{name} excluded {report['excluded_frames']} menu, paused or unfocused frame starts. Process CPU still spans the whole recording.")
if report.get("elapsed_seconds", 0) < 60:
warnings.append(f"{name} is shorter than 60 seconds; use longer repeated runs for decisions.")
if baseline["kind"] == "ticks" and baseline.get("peak_players") != candidate.get("peak_players"):