-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add simple synthetic modules graph benchmarks #7465
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
Merged
Merged
Conversation
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
@swift-ci test |
bnbarham
reviewed
Apr 18, 2024
@@ -13,16 +13,17 @@ | |||
import struct DequeModule.Deque | |||
|
|||
/// Directed graph that stores edges in [adjacency lists](https://en.wikipedia.org/wiki/Adjacency_list). | |||
struct DirectedGraph<Node> { | |||
init(nodes: [Node]) { | |||
@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly) |
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.
I think @_spi(Testing)
or something similar is clear enough :)
bnbarham
approved these changes
Apr 18, 2024
bnbarham
added a commit
to bnbarham/swift-package-manager
that referenced
this pull request
Apr 18, 2024
SPI was added here in swiftlang#7465, but missed adding it to this module.
MaxDesiatov
added a commit
that referenced
this pull request
Apr 18, 2024
SPI was added here in #7465, but missed adding it to this module. --------- Co-authored-by: Max Desiatov <m_desiatov@apple.com>
furby-tm
pushed a commit
to wabiverse/swift-package-manager
that referenced
this pull request
May 15, 2024
New `SyntheticModulesGraph` benchmark is introduced, which calls `loadModulesGraph` function that we already run against test fixtures in `ModulesGraphTests` and `BuildPlanTests`. The function under benchmark almost immediately delegates to `ModulesGraph.load`, which is used in real-world modules graph dependency resolution. Benchmark parameters are controlled with `SWIFTPM_BENCHMARK_MODULES_GRAPH_DEPTH` and `SWIFTPM_BENCHMARK_MODULES_GRAPH_WIDTH` environment variables, so in the future we should be able to plot graphs of benchmark metrics against depth and width of modules graph over a given range. Thresholds are now split into platform-specific directories so that thresholds recorded on x86_64 don't interfere with thresholds for arm64, same for the OS family.
furby-tm
pushed a commit
to wabiverse/swift-package-manager
that referenced
this pull request
May 15, 2024
SPI was added here in swiftlang#7465, but missed adding it to this module. --------- Co-authored-by: Max Desiatov <m_desiatov@apple.com>
furby-tm
pushed a commit
to wabiverse/swift-package-manager
that referenced
this pull request
May 15, 2024
New `SyntheticModulesGraph` benchmark is introduced, which calls `loadModulesGraph` function that we already run against test fixtures in `ModulesGraphTests` and `BuildPlanTests`. The function under benchmark almost immediately delegates to `ModulesGraph.load`, which is used in real-world modules graph dependency resolution. Benchmark parameters are controlled with `SWIFTPM_BENCHMARK_MODULES_GRAPH_DEPTH` and `SWIFTPM_BENCHMARK_MODULES_GRAPH_WIDTH` environment variables, so in the future we should be able to plot graphs of benchmark metrics against depth and width of modules graph over a given range. Thresholds are now split into platform-specific directories so that thresholds recorded on x86_64 don't interfere with thresholds for arm64, same for the OS family.
furby-tm
pushed a commit
to wabiverse/swift-package-manager
that referenced
this pull request
May 15, 2024
SPI was added here in swiftlang#7465, but missed adding it to this module. --------- Co-authored-by: Max Desiatov <m_desiatov@apple.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
modules graph
Modules dependency resolution
no functional change
No user-visible functional changes included
performance
Performance optimizations and improvements
test suite
improvements to SwiftPM test suite
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.
New
SyntheticModulesGraph
benchmark is introduced, which callsloadModulesGraph
function that we already run against test fixtures inModulesGraphTests
andBuildPlanTests
. The function under benchmark almost immediately delegates toModulesGraph.load
, which is used in real-world modules graph dependency resolution.Benchmark parameters are controlled with
SWIFTPM_BENCHMARK_MODULES_GRAPH_DEPTH
andSWIFTPM_BENCHMARK_MODULES_GRAPH_WIDTH
environment variables, so in the future we should be able to plot graphs of benchmark metrics against depth and width of modules graph over a given range.Thresholds are now split into platform-specific directories so that thresholds recorded on x86_64 don't interfere with thresholds for arm64, same for the OS family.