Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9be444e
test(fixtures): add DatasetFixture API and builder with initial suppo…
poikilotherm Apr 17, 2026
e005295
test(performance): introduce integration tests for large dataset expo…
poikilotherm Apr 17, 2026
b8b2847
chore(util): add comments highlighting design flaws in variable metad…
poikilotherm Apr 17, 2026
c14802a
docs(testing): replace `VariableMetadata` references with proper Java…
poikilotherm Apr 26, 2026
22983d8
test(fixtures): add method to populate `VariableMetadata` in fixture …
poikilotherm Apr 26, 2026
68c8b9f
refactor(fixtures): extract `BuildContext` and `FileBuildContext` int…
poikilotherm Apr 26, 2026
188848a
test(fixtures): replace `System.out.println` with `toString` in `Data…
poikilotherm Apr 26, 2026
1ef86a4
feat(fixtures): extend `DatasetFixture` to include `VariableMetadata`…
poikilotherm Apr 26, 2026
69e2dd7
refactor(fixtures): restructure `DatasetFixtureBuilder` to improve mo…
poikilotherm Apr 26, 2026
5e2589c
test(fixtures): initialize MPCONFIG for `JvmSettings` in `DatasetFixt…
poikilotherm Apr 27, 2026
847c923
test(fixtures): adjust smoketest size to be more manageable
poikilotherm Apr 27, 2026
278b7ca
fix(fixtures): ensure bidirectional linkage between `DatasetVersion` …
poikilotherm Apr 27, 2026
2636065
fix(fixtures): ensure timestamps are explicitly set for required `DvO…
poikilotherm Apr 27, 2026
cedaab3
feat(fixtures): add support for `DatasetType` in `DatasetRecipe` and …
poikilotherm Apr 27, 2026
4215b92
test(performance): add fixtures to large dataset export testing
poikilotherm Apr 28, 2026
bfccabe
docs(fixtures): add detailed documentation for test fixture generator…
poikilotherm Apr 30, 2026
b7b335e
test(performance): remove `JpaTestBootstrap` utility from performance…
poikilotherm May 2, 2026
595e8f2
test(performance): introduce JPA performance testing utilities and JU…
poikilotherm May 2, 2026
4ead806
test(performance): migrate large dataset export test to `JpaPerforman…
poikilotherm May 2, 2026
5e18459
test(performance): add `persistence.xml` for test configuration
poikilotherm May 2, 2026
8095d2f
docs(performance): add comprehensive guide for performance testing se…
poikilotherm May 2, 2026
4bb2816
docs(develop): add temporary links to testing fixtures and performanc…
poikilotherm May 2, 2026
36c9e93
docs: enable Markdown support in Sphinx and update myst-parser version
poikilotherm May 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/sphinx-guides/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Sphinx==7.4.0
sphinx-icon==0.1.2

# Markdown support
myst-parser==2.0.0
myst-parser==4.0.0

# tabs
sphinx-tabs==3.4.5
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package edu.harvard.iq.dataverse.somepackage;

import edu.harvard.iq.dataverse.util.testing.performance.JpaEntityManagerService;
import edu.harvard.iq.dataverse.util.testing.performance.JpaPerformanceTest;
import net.ttddyy.dsproxy.QueryCount;
import net.ttddyy.dsproxy.QueryCountHolder;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.time.Instant;
import java.time.temporal.ChronoUnit;
import jakarta.persistence.EntityManager;

import static org.junit.jupiter.api.Assertions.assertNotNull;

// Single annotation for automatic setup of
// 1) basic tags for JUnit groups,
// 2) shared PostgreSQL server via Testcontainers, and
// 3) creation and injection of JPA entity manager service.
@JpaPerformanceTest
class SamplePerformanceIT {

static JpaEntityManagerService jpa;

@BeforeAll
static void setUp() {
// A manual start is necessary to allow you to selectively enable service features as necessary
jpa.start();

// inTransactionVoid: Use this when you only need to execute database operations
// (e.g., persisting test fixtures) without returning a value.
jpa.inTransactionVoid(em -> {
// EntityManager em is provided here.
// em.persist(myEntity);
});
}

@Test
void shouldMeasureOperationPerformance() {
// Clear any previous query statistics
QueryCountHolder.clear();
Instant start = Instant.now();

// inTransaction: Use this when your operation returns a result that needs
// to be asserted or measured.
Object result = jpa.inTransaction(em -> {
// Execute your performance-critical operation using the EntityManager.
// return result;
return null; // Placeholder
});

Instant end = Instant.now();
assertNotNull(result);

// Retrieve and log ORM statistics
QueryCount count = QueryCountHolder.getGrandTotal();
System.out.println("Elapsed ms: " + start.until(end, ChronoUnit.MILLIS));
System.out.println("Total queries: " + count.getTotal());
System.out.println("Select queries: " + count.getSelect());
System.out.println("Insert queries: " + count.getInsert());
System.out.println("Update queries: " + count.getUpdate());
System.out.println("Delete queries: " + count.getDelete());
}
}
5 changes: 4 additions & 1 deletion doc/sphinx-guides/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}

# The encoding of source files.
#source_encoding = 'utf-8-sig'
Expand Down
2 changes: 2 additions & 0 deletions doc/sphinx-guides/source/developers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ Developer Guide
fontcustom
classic-dev-env
search-services
testing/fixtures.md
testing/performance.md

Loading
Loading