-
-
Notifications
You must be signed in to change notification settings - Fork 2
Coordination: Prepare for students code using PHP 8.3 #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To me there is nothing to do:
That said I could also update the base docker image of the representer so everything runs on PHP8.3 |
I will mark the presenter as ready for PHP8.3, as your additions most likely won't affect any solutions soon. For running on PHP 8.3: Use |
For the record, I did upgrade the runtime for the representer to PHP8.3. I did not try to change XDEBUG settings nor looked into the 2 normalizations I did suggest above. So I will let this issue open for now. |
I tried doing this, and it didn't lead to any significant change. Maybe I did it wrong though. My steps were:
❯ ./hyperfine 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output' 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=off representer-base "toto" /solution /output'
Benchmark 1: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output
Time (mean ± σ): 1.740 s ± 0.103 s [User: 0.012 s, System: 0.013 s]
Range (min … max): 1.598 s … 1.961 s 10 runs
Benchmark 2: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=off representer-base "toto" /solution /output
Time (mean ± σ): 1.737 s ± 0.098 s [User: 0.012 s, System: 0.013 s]
Range (min … max): 1.620 s … 1.938 s 10 runs
Summary
docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=off representer-base "toto" /solution /output ran
1.00 ± 0.08 times faster than docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output Note that running with ❯ ./hyperfine 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output' 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=debug,coverage representer-base "toto" /solution /output'
Benchmark 1: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output
Time (mean ± σ): 1.536 s ± 0.021 s [User: 0.011 s, System: 0.013 s]
Range (min … max): 1.508 s … 1.573 s 10 runs
Benchmark 2: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=debug,coverage representer-base "toto" /solution /output
Time (mean ± σ): 1.536 s ± 0.033 s [User: 0.012 s, System: 0.013 s]
Range (min … max): 1.491 s … 1.604 s 10 runs
Summary
docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output ran
1.00 ± 0.03 times faster than docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp --env XDEBUG_MODE=debug,coverage representer-base "toto" /solution /output I also tried with adding a ❯ ./hyperfine 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output' 'docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-prod "toto" /solution /output'
Benchmark 1: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output
Time (mean ± σ): 1.559 s ± 0.019 s [User: 0.013 s, System: 0.011 s]
Range (min … max): 1.527 s … 1.585 s 10 runs
Benchmark 2: docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-prod "toto" /solution /output
Time (mean ± σ): 1.550 s ± 0.033 s [User: 0.013 s, System: 0.011 s]
Range (min … max): 1.504 s … 1.602 s 10 runs
Summary
docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-prod "toto" /solution /output ran
1.01 ± 0.02 times faster than docker run --rm --network none --read-only --cpus 0.5 --mount type=bind,source="/home/foo/php-representer/solutions/bench-simple-cipher",destination=/solution --mount type=tmpfs,destination=/output --mount type=tmpfs,destination=/tmp representer-base "toto" /solution /output I believe that this is because we are in CLI and hence those settings have close to 0 impact. I also tried to run those with |
It's been a year since I was hit by the performance degradation and haven't looked into it lately. Seems to be gone now, that's good news! |
I'm closing this after #299:
|
For exercism/php#652 we need to have the representer ready to accept PHP 8.3 code from students. The representer itself may run on a different PHP version.
@homersimpsons Can you outline the required work to do here? An actionable list of tasks would be perfect, but any hints are welcome.
The text was updated successfully, but these errors were encountered: