Skip to content
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

POC: Opcode counter #904

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

POC: Opcode counter #904

wants to merge 1 commit into from

Conversation

dantleech
Copy link
Member

This PR experiments with adding an opcode executor which provides a count of the opcodes executed during the benchmark.

TL;DR: It should be possible to provide a count of the opcodes for the subject only.

Counting Opcodes

  • It seems not possible to enable the opcode debugging during execution (e.g. to capture only the subject's opcodes)
  • It would be possible to first execute the script without running the subject, then again with the subject, and subtract the first from the second.

Including Opcodes alongside the regular results

Would be possible to add a new CompositeExecutor which ran a set of executors. I.e. to execute the opcode executor and the regular executor.

Pre and post optimisation

By using the CompositeExecutor it would be possible to run two instances of the Opcode executor, one for unoptimised and one with optimised results.

Debugging Opcodes

It would also be good to add a convenience command to debug the opcodes. However, I cannot see a way to separate the signal from the noise. The opcodes are not presented in the order that would make this possible.

@dantleech dantleech added this to In Progress in PHPBench 1.2 Oct 20, 2021
@dantleech dantleech moved this from In Progress to On Hold in PHPBench 1.2 Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant