GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [fix][test] Pass the client profiler's options to pulsar-perf in the profiling tests by merlimat · Pull Request #27428 · apache/pulsar Conversation
Contributor
Motivation#26619 added async-profiler recordings of the withEnv("PULSAR_EXTRA_OPTS", "-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints " + "-agentpath:/opt/async-profiler/lib/libasyncProfiler.so=start," + options + ",file=/testoutput/client-" + role + "-%t-%p.jfr");
// Clear out PULSAR_EXTRA_OPTS and OPTS so that they don't interfere with the test .withEnv(List.of("PULSAR_EXTRA_OPTS=", "OPTS=")); The exec's value replaces the container's, so For example, in a container of the test image started with Modifications
withEnv("PERF_PROFILING_OPTS", "-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints " + "-agentpath:/opt/async-profiler/lib/libasyncProfiler.so=start," + options + ",file=/testoutput/client-" + role + "-%t-%p.jfr"); pulsarPerf = "PULSAR_EXTRA_OPTS=\"$PERF_PROFILING_OPTS\" /pulsar/bin/pulsar-perf"; Without client profiling options, Verifying this change
The profiling tests are manual tests, which CI doesn't run. The change was verified with PULSAR_PROFILING_LOAD_NUMBER_OF_MESSAGES=2000000 \
PULSAR_PROFILING_PROFILING_PRODUCER_OPTIONS=event=cpu,interval=10ms \
PULSAR_PROFILING_PROFILING_CONSUMER_OPTIONS=event=cpu,interval=10ms \
./gradlew :tests:integration:profilingIntegrationTest --tests "*PulsarProfilingV4Test"
Does this pull request potentially affect one of the following parts:If the box was checked, please highlight the changes
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…profiling tests PulsarPerfContainer.enableProfiling put the async-profiler agent into the perf container's PULSAR_EXTRA_OPTS, but produce() and consume() start pulsar-perf with DockerUtils.runCommandAsyncWithLogging, whose exec environment sets PULSAR_EXTRA_OPTS and OPTS to empty. The exec's value replaces the container's, so pulsar-perf ran without the agent and the client-producer/client-consumer recordings were never written. Keep the options in a container variable of their own, PERF_PROFILING_OPTS, and start pulsar-perf with PULSAR_EXTRA_OPTS="$PERF_PROFILING_OPTS" when the client is profiled. Without client profiling options the commands are unchanged, and the environment of DockerUtils' execs stays as it is.
codelipenghui
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |