Repository navigation
[Docs][Tests] Profile the transaction benchmarks with dotTrace - #63
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The profiling guidance depends on still-open PR #65, leaving merge ordering, integration of its injector/runtime fixes, and combined validation on .NET Framework and modern Revit/.NET unresolved.
No open issues 🎉
What changed in this PR
Adds dotTrace profiling guidance and a runnable transaction benchmark example for the Revit benchmark library, complementing the profiling support in PR #65.
Changes:
- Documents global and per-class dotTrace configuration in the README and changelog.
- Adds the dotTrace diagnostics dependency at version 0.15.8.
- Compares updating 100 walls in one transaction versus one transaction per wall, saving the document during cleanup.
| File | Description |
|---|---|
tests/Nice3point.BenchmarkDotNet.Revit.Benchmarks/TransactionBenchmarks.cs |
Adds profiled transaction comparisons with model setup and cleanup. |
tests/Nice3point.BenchmarkDotNet.Revit.Benchmarks/Nice3point.BenchmarkDotNet.Revit.Benchmarks.csproj |
References the dotTrace diagnostics package. |
README.md |
Explains global and per-class profiling configuration. |
Directory.Packages.props |
Pins dotTrace diagnostics to version 0.15.8. |
CHANGELOG.md |
Records profiling support and configuration examples. |
Review effort: Balanced
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.
Summary of the Pull Request
What is this about:
The README and the benchmark project show how to profile the benchmarks with dotTrace.
Description:
What changed
DotTrace profilersection of the README addsDotTraceDiagnoserto the configuration inProgram.cs, and names the[DotTraceDiagnoser]attribute for a single class.DotTrace profilersection with the same configuration.BenchmarkDotNet.Diagnostics.dotTrace0.15.8.TransactionBenchmarkssets the comment of 100 walls in one transaction and in a transaction per wall, with[DotTraceDiagnoser]on the class.Where to look
OnGlobalCleanupsaves the document. The API closes no active document:Close(false)throws "The active document may not be closed from the API". An unsaved document shows the save dialog when Revit exits.RevitApiBenchmarkclasses, which profile only with the fix of [Benchmarks] Profile RevitApiBenchmark benchmarks with dotTrace #65.How verified
Build:
Release.R21toRelease.R27, zero warnings, zero errors.TransactionBenchmarks:SetCommentsInOneTransactionSetCommentsInTransactionPerWallDefaultShortRun, with the cleanupShortRun, with the cleanupWith the cleanup, Revit exited 16 s after the end of the run, without the 30 s timeout that ends a Revit process held by a dialog.
Quality Checklist