Performance Testing Infrastructure Bits#12365
Conversation
…rt for tabular and standard files #11405 Introduced a new `DatasetFixture` structure and its builder API to simplify test dataset creation. This includes support for datasets, versions, files (tabular and standard), and associated metadata. Added unit tests and minimal populator implementation for scalar field initialization.
…rt with JpaTestBootstrap setup #11405 Introduced `HugeDatasetExportPerformanceIT` for testing large dataset export performance. Added `JpaTestBootstrap` to streamline test setup with Testcontainers and JPA. Updated dependencies to include `datasource-proxy` for query tracking and enhanced test tooling. Note: this doesn't work yet, as we need a fixture generator first.
…ata handling in JsonPrinter #11405
…o dedicated classes Simplified method signatures and improved maintainability by decoupling builder-internal types from fixture populators. Updated references across the codebase to use the new context classes.
…setFixtureTest` Avoid measuring the speed of writing to the stream, while only the speed of converting the JSON in-memory model to a String is of interest.
…dularity and add robust variable metadata handling
…ureTest` setup Otherwise the initialization will be counted towards the execution time of building the POJOs.
We are only interested in the smoke. We will create more distinct performance related tests.
…and `TermsOfUseAndAccess` in `MinimalPopulator`
…bject` properties in fixture builders (Dataset and DataFile)
…its integration across fixture builders and tests using a new recipe
This comment has been minimized.
This comment has been minimized.
… and recipes Provides comprehensive guides and examples for using the dataset fixture generator, recipes, and populators. Includes usage scenarios, architecture overview, persistence guidance, and extension recommendations to support test development.
This comment has been minimized.
This comment has been minimized.
… tests This utility is replaced by a more sophisticated JUnit extension
…nit extension Adds `JpaEntityManagerService` for managing JPA entity lifecycle and transaction operations in tests, the `JpaPerformanceTest` annotation to streamline performance test setup with Testcontainers, and the `JpaPerformanceTestExtension` to handle shared PostgreSQL container and database isolation. Updates `pom.xml` with required dependencies for these utilities.
…ceTest` utilities Replaces `JpaTestBootstrap` and manual container management with the `JpaPerformanceTest` annotation and `JpaEntityManagerService`. Removes redundant `@AfterAll` cleanup logic.
Includes resource-local transaction management, entity scanning setup, and matching production-like JPA properties, but tailored for test scenarios.
…tup and best practices Includes instructions for running performance tests, database-bound testing with Testcontainers, and using `JpaEntityManagerService`. Provides example test class, configuration details, and advanced usage for query profiling.
Adds support for Markdown files in Sphinx configuration. Upgrades `myst-parser` from `2.0.0` to `4.0.0` in requirements for compatibility.
|
I think this is ready for a review and inclusion in the codebase. It's not all done, but there is a reasonable amount of functionality, a whole bunch of documentation and even some first test using it. A solid base for further extension and especially for creating performance tests. Sending this to "ready for review" |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
landreev
left a comment
There was a problem hiding this comment.
This is great stuff. I've been using some of this code informally, but we should have merged it sooner.
Thank you Oliver!
pdurbin
left a comment
There was a problem hiding this comment.
Looks good and low-risk to merge. Approving.
Yes the dev guide sidebar is getting too long. We're talking about it here: #docs > dev guide growing too large @ 💬
Not that a new version of myst is specified. I'll try to remember to add that to the release notes.
What this PR does / why we need it:
In the current codebase, there are no ways to create larger object graphs for datasets, which would allow for performance testing.
Many problematic code pieces and design choices only become visible as problematic once you start hitting them with larger quantities, in isolation and controlled circumstances. Many small losses, that still add up when scaling to more users are not detected by classic tests.
This PR introduces:
Which issue(s) this PR closes:
None. It's an offspring to #11405 (related), but will not close it. It already uncovered #12362 (but is not a fix for it).
Special notes for your reviewer:
You should take a look at the documentation at the example tests, maybe play around some more with it. Use a profiler to capture more details, and so on.
Suggestions on how to test this:
It's a self-contained package with infrastructure and tests 😉
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope
Is there a release notes update needed for this change?:
Not sure. Do we mention these things?
Additional documentation:
None. 🔋 included.