test: allow profiling performance tests DHIS2-20175#22080
Merged
Conversation
16e8461 to
3a64255
Compare
3a64255 to
a49acd9
Compare
enricocolasante
approved these changes
Sep 30, 2025
a49acd9 to
d89898e
Compare
dcca44c to
286a9f1
Compare
ameenhere
approved these changes
Sep 30, 2025
286a9f1 to
bbaa11e
Compare
Contributor
|
Just flagging this one |
|
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.



run-simulation.shis used in our performance test comparison workflow added in #22026. The script can also be used locally to run the tests in the exact same way if we want to investigate any results in more detail. One method to get more insights is profiling which this PR adds. We could in theory profile on the GH runner. For now I suggest we only profile locally as the profiling artifact can be large depending on what you profile.Pass
PROF_ARGStorun-simulation.shwith any of https://github.com/async-profiler/async-profiler/blob/master/docs/ProfilerOptions.md and it will start/stop the profiler before/after the simulation run. The profiler results will be next to the Gatling results as flamegraph and in JFR (Java Flight Recorder) format. JFR is very flexible and allows us to keep therun-simulation.shlogic small. Users can then use https://github.com/async-profiler/async-profiler/blob/master/docs/ConverterUsage.md to convert it to whatever they need.Test
Checkout PR and run this locally if you like
PROF_ARGS="-e cpu" \ DHIS2_IMAGE=dhis2/core-dev:master \ DHIS2_DB_DUMP_URL=https://databases.dhis2.org/sierra-leone/2.42.1/dhis2-db-sierra-leone.sql.gz \ DHIS2_DB_IMAGE_SUFFIX=sierra-leone-2.42.1 \ SIMULATION_CLASS=org.hisp.dhis.test.tracker.EnrollmentsTest \ ./run-simulation.shMisc
run-simulation.shNext
Enrico will add his performance test using a scenario derived from Capture app usage.