Skip to content

MysqliStmtWrapper was not timing executes individually, but cumulatively. - #14

Merged
daveedis merged 3 commits into
mainfrom
bugfix/cumulative-time-instead-of-execute-time
Oct 16, 2026
Merged

daveedis merged 3 commits into
mainfrom
bugfix/cumulative-time-instead-of-execute-time

Conversation

@itoolsTim

Copy link
Copy Markdown
Contributor

MysqliStmtWrapper was not resetting start time between executions leading to a cumulative time being measured instead of a single execution. No documents refer to this being cumulative. Ideally callers would simply sum up single executions (as outlined for debug footer which does the totals). This also is documented as being single runs in QueryLog.php:79 and all per-query in Connection.php:119, DB.php:100, ConnectionInternals.php:1446.

Test included. All tests pass.

…ely. Moved $startTime into execute with microtime(). Added test for this change. All passed.
@itoolsTim
itoolsTim requested review from daveedis and a lite review from Copilot and removed request for Copilot August 26, 2026 21:54
@daveedis

Copy link
Copy Markdown
Contributor

Hi Tim,

Good catch on this one, thanks! Merging it now.

Appreciate it!

@daveedis
daveedis merged commit 46ffa38 into main Oct 16, 2026
119 checks passed
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.

3 participants