The debug lib lets you hook behaviors on line changes, entering a function and leaving it, but nothing for single bytecodes iirc.
The debug lib, allowing to take control of the whole program, is disabled in most sandboxed environments including wikipedia's.
However, bytecode instruction and line changes both are poor metrics to measure time, cpu or any other kind of resource usage. Measuring process time is relatively easy and much more accurate.
The debug lib, allowing to take control of the whole program, is disabled in most sandboxed environments including wikipedia's.
However, bytecode instruction and line changes both are poor metrics to measure time, cpu or any other kind of resource usage. Measuring process time is relatively easy and much more accurate.