Repository navigation
Extract the benchmark comparator into a reusable library; benchmark-compare becomes a thin wrapper (SAM#211) - #14
Merged
Conversation
SAM.Analytical.Benchmark.Compare becomes a net8.0 class library (build\SAM.Analytical.Benchmark.Compare.dll) holding the unchanged Classes/Query/Modify sources: Query.Compare, Modify.WriteReports and the DTOs. Format becomes public so consumers display exactly the report strings. benchmark-compare moves to SAM.Analytical.Benchmark.Compare.Cli, a thin wrapper with the same name, location, options, outputs and exit codes. Regression: Fixtures/Regression holds what the pre-extraction CLI produced for three cases (committed fixtures, scenario pair, weather mismatch) and all --fail-on-gate modes; the library route and the wrapper CLI must reproduce reports, exit codes and console output byte for byte. A separate ApiTests project, outside InternalsVisibleTo, pins the public contract. CI's engine-reference check now covers both projects and runs the API tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fgbs3ko6Xix9Ut15onTY7R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fgbs3ko6Xix9Ut15onTY7R
This was referenced Oct 17, 2026
…(SAM#211) Query.ModelMetricValues / SpaceMetricValues list one engine's metrics under the comparator's keys and order, with null for an unreported metric. The comparator now builds its rows from them, so a consumer showing one engine's results (the other engine did not complete) shares the key list. Regression goldens are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fgbs3ko6Xix9Ut15onTY7R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fgbs3ko6Xix9Ut15onTY7R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Depends on
Nothing. Consumed by the SAM_UI draft PR on the same branch name (
claude/tas-openstudio-comparison, SAM-BIM/SAM_UI#238 for #231). SAM_UI's CI selects this branch by name, so it builds against this library before merge. Keep this PR draft until the owner has run the Windows comparison test. Do not merge before that.Issues addressed by this PR
Implements SAM-BIM/SAM#211 (sub-issue of SAM-BIM/SAM#209, tracker SAM-BIM/SAM#206). Issues are disabled in this repository.
SAM.Analytical.Benchmark.Compareis now a net8.0 class library, built tobuild\SAM.Analytical.Benchmark.Compare.dll.Classes/Query/Modifysources: no logic change, no new dependency.Formatbecomespublic, so consumers show exactly the strings in the reports.benchmark-comparemoves toSAM.Analytical.Benchmark.Compare.Cli, a thin wrapper (Program.csmoved unchanged). Its name, location inbuild\, options, outputs and exit codes are the same.70f1411), for SAM_UI's Run Simulation partial-completion view:Query.ModelMetricValues(BenchmarkModelResult?)andQuery.SpaceMetricValues(BenchmarkSpaceResult?)list one engine's metrics under the comparator's keys and order. An unreported metric has anullvalue; nothing is substituted.Query.Compare,Query.IsInformationalForNumericalGate,Query.ModelMetricValues,Query.SpaceMetricValues;Modify.WriteReports/WriteMarkdown/WriteCsv/WriteSummaryJson;Format.*;ToleranceProfileand the enums.Test files
SAM.Analytical.Benchmark.Compare.Tests/ExtractionRegressionTests.cswith the goldens inFixtures/Regression/{fixtures,scenario,weather-mismatch}/.c9a7f19, for all--fail-on-gatemodes.SAM.Analytical.Benchmark.Compare.ApiTests/PublicApiTests.cssits outsideInternalsVisibleTo, so it compiles only against the public contract. It includes the metric-enumeration keys and order matching the comparator rows.Local results on Linux (.NET SDK 10.0.112, net8.0). Tested content SHA:
70f1411(record-only commit after it).benchmark-compareexecutable on the scenario caseb0f3a16)All test inputs are fabricated documents, not engine results.
Additional comments
net8.0-windows) consumes it directly..gitattributes).git diff --checkflags it, and that is expected.docs/benchmark/COMPARE-LIBRARY-PR.md.PROJECT_PROGRESS.mdis updated only after merge.Generated by Claude Code