diff --git a/CMakeLists.txt b/CMakeLists.txt index 7386b98f193f..1c71e846358f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -934,6 +934,9 @@ if(BUILD_TESTING) add_test(NAME title_run_identity COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_title_run_identity.py) set_tests_properties(title_run_identity PROPERTIES TIMEOUT 30) + add_test(NAME title_run_machines COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_title_run_machines.py) + set_tests_properties(title_run_machines PROPERTIES TIMEOUT 30) add_test(NAME performance_compare COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_performance_compare.py) set_tests_properties(performance_compare PROPERTIES TIMEOUT 20) @@ -952,6 +955,18 @@ if(BUILD_TESTING) add_test(NAME title_run COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_title_run.py) set_tests_properties(title_run PROPERTIES TIMEOUT 60) + + foreach(cache_policy_class CachePolicyFactsTests CachePolicyContextTests CachePolicyCliDefaultsTests + CachePolicyCliOverrideTests CachePolicyCliFlagsTests CachePolicyAggregateTests) + add_test(NAME title_run_cache_${cache_policy_class} COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_title_run_cache.py ${cache_policy_class}) + set_tests_properties(title_run_cache_${cache_policy_class} PROPERTIES TIMEOUT 30) + endforeach() + foreach(observation_class ShortObservationTests LongObservationTests) + add_test(NAME title_run_observation_${observation_class} COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_title_run_observation.py ${observation_class}) + set_tests_properties(title_run_observation_${observation_class} PROPERTIES TIMEOUT 30) + endforeach() foreach(performance_capture_class WindowParsing CaptureEnvironment CompletedCapture InvalidSummaries InvalidTraces BoundsAndLinks LossEvidence) add_test(NAME performance_capture_${performance_capture_class} COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_performance_capture.py ${performance_capture_class}) diff --git a/docs/dev/PERFORMANCE_BISECT.md b/docs/dev/PERFORMANCE_BISECT.md index 0d486ff949d5..65482bca7034 100644 --- a/docs/dev/PERFORMANCE_BISECT.md +++ b/docs/dev/PERFORMANCE_BISECT.md @@ -52,6 +52,10 @@ The known-good revision must be an ancestor of the known-bad revision. The tool Each tested revision runs `title_run.py` repeatedly with one measured run per invocation. The median FPS is compared with the good endpoint. A search stops instead of guessing if the bad endpoint is not slow enough, a run fails to render, the machine/title/content identity changes, or sample spread exceeds `max_spread_pct`. +Each sample requires clean native runtime provenance matching the requested commit as well as the clean source checkout. Native trace `commit`/`dirty` and run-report `anyps5.commit`/`modified` are checked together, including all recorded intervals. A missing, unknown, modified or conflicting identity stops the search. Historical title runners that omit native identity cannot provide a qualified sample; their saved metrics remain readable by the title-run comparison. + +Machine identity comes from the measured run's `machine` record. A present but malformed or incomplete record never falls back to the batch aggregate. A legacy summary without that record can use global machine fields only when the actual file contains exactly one title and one run; a multi-title aggregate does not identify the measured run. This exception preserves older single-title recipes without treating reported identities as hardware attestation. The existing required machine fields are unchanged. + ## Read the report The command prints the first measured regression and its previous good commit. The optional JSON report records those commits, the supplied endpoints, the percentage threshold, the sample spread limit, the first-parent method, its monotonicity assumption, and every commit actually measured. `tested_commits` can be much smaller than `commits_between` because the search is logarithmic; it is not a claim that every commit was benchmarked. diff --git a/docs/dev/TRACING.md b/docs/dev/TRACING.md index cf1a339e83e9..d07e9157db08 100644 --- a/docs/dev/TRACING.md +++ b/docs/dev/TRACING.md @@ -85,7 +85,9 @@ See [Build](BUILD.md#performance-trace) for the trace format, summary fields and ## Running titles repeatably -`python tools/title_run.py --games [ID ...]` relinks and runs extracted title packages found under `--games` (a directory holding `eboot.bin` and `sce_sys/param.json`) and writes `summary.json` and a fixed-format `summary.md` under `--out` (default `build/title-runs/-