Skip to content

Conversation

@diegolovison
Copy link

The build_jars function was permanently changing the shell's directory to the project root. This caused relative paths for output files (defined in the scripts dir) to resolve incorrectly later in the script.

Switched to pushd/popd to ensure the execution context is restored after the build completes.

By following the documentation at
https://github.com/franz1981/Netty-VirtualThread-Scheduler/blob/master/benchmark-runner/README.md?plain=1#L25-L37

The script will fail with: tee: ./benchmark-results/wrk-results.txt: No such file or directory

tee: ./benchmark-results/wrk-results.txt: No such file or directory
[2026-01-19 17:40:37] Cleaning up...
[2026-01-19 17:40:37] Stopping mock server (PID: 1616)
[2026-01-19 17:40:37] Stopping handoff server (PID: 1651)
[2026-01-19 17:40:38] Cleanup complete

With the fix, we will have the following logs:

[2026-01-19 18:09:48] Load test complete
[2026-01-19 18:09:48] Results saved to: ./benchmark-results/wrk-results.txt
[2026-01-19 18:09:48] Benchmark complete!
[2026-01-19 18:09:48] Results in: ./benchmark-results
[2026-01-19 18:09:48] Cleaning up...
[2026-01-19 18:09:48] Stopping mock server (PID: 1324)
[2026-01-19 18:09:48] Stopping handoff server (PID: 1359)
[2026-01-19 18:09:49] Cleanup complete

The `build_jars` function was permanently changing the shell's directory to the project root. This caused relative paths for output files (defined in the scripts dir) to resolve incorrectly later in the script.

Switched to `pushd/popd` to ensure the execution context is restored after the build completes.
@franz1981
Copy link
Owner

This has never occurred to me; how you would make it happen? Under which circumstances?

@franz1981
Copy link
Owner

To be fair I could just remove the build-jar as a whole too, because it's expected users have build the jar...WDYT?

@diegolovison
Copy link
Author

Sounds good.

I think mvn clean install from the main README.md is enough.
You can remove the build instructions for the others README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants