Skip to content

sqlite: expose prepared statement statistics#64541

Open
geeksilva97 wants to merge 1 commit into
nodejs:mainfrom
geeksilva97:sqlite-statement-statistics
Open

sqlite: expose prepared statement statistics#64541
geeksilva97 wants to merge 1 commit into
nodejs:mainfrom
geeksilva97:sqlite-statement-statistics

Conversation

@geeksilva97

@geeksilva97 geeksilva97 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Closes #64540

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 16, 2026
@geeksilva97 geeksilva97 force-pushed the sqlite-statement-statistics branch 2 times, most recently from f5e8fcb to 2195e97 Compare July 16, 2026 18:42
@geeksilva97 geeksilva97 marked this pull request as ready for review July 16, 2026 18:43
@bakkot

bakkot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

I'm a little uncomfortable with getters that create an object every time they're read.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.54545% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.25%. Comparing base (cc8594a) to head (2195e97).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/node_sqlite.cc 94.54% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64541      +/-   ##
==========================================
+ Coverage   90.22%   90.25%   +0.02%     
==========================================
  Files         739      739              
  Lines      241709   241764      +55     
  Branches    45551    45549       -2     
==========================================
+ Hits       218094   218194     +100     
+ Misses      15144    15103      -41     
+ Partials     8471     8467       -4     
Files with missing lines Coverage Δ
src/node_sqlite.h 80.64% <ø> (ø)
src/node_sqlite.cc 80.99% <94.54%> (+0.27%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@geeksilva97 geeksilva97 added the wip Issues and PRs that are still a work in progress. label Jul 16, 2026
@geeksilva97 geeksilva97 force-pushed the sqlite-statement-statistics branch from 2195e97 to bbbbeec Compare July 16, 2026 20:40
Signed-off-by: geeksilva97 <edigleyssonsilva@gmail.com>
@geeksilva97 geeksilva97 force-pushed the sqlite-statement-statistics branch from bbbbeec to bef2511 Compare July 16, 2026 21:12
Comment thread src/node_sqlite.h
{"run", SQLITE_STMTSTATUS_RUN},
{"filterMiss", SQLITE_STMTSTATUS_FILTER_MISS},
{"filterHit", SQLITE_STMTSTATUS_FILTER_HIT},
{"memused", SQLITE_STMTSTATUS_MEMUSED},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{"memused", SQLITE_STMTSTATUS_MEMUSED},
{"memUsed", SQLITE_STMTSTATUS_MEMUSED},

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. wip Issues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite: expose prepared statement stats

4 participants