Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -5139,10 +5139,11 @@ idx = upr>>(1-biasRight); /* idx = biasRight ? upr : (lwr+upr)/2; */ pCur->aiIdx[pCur->iPage] = (u16)idx; if( xRecordCompare==0 ){ for(;;){ i64 nCellKey; +sqlite3PerfCnt++; pCell = findCellPastPtr(pPage, idx); if( pPage->intKeyLeaf ){ while( 0x80 <= *(pCell++) ){ if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT; } @@ -5172,10 +5173,11 @@ idx = (lwr+upr)>>1; /* idx = (lwr+upr)/2; */ } }else{ for(;;){ int nCell; /* Size of the pCell cell in bytes */ +sqlite3PerfCnt++; pCell = findCellPastPtr(pPage, idx); /* The maximum supported page-size is 65536 bytes. This means that ** the maximum number of record bytes stored on an index B-Tree ** page is less than 16384 bytes and may be stored as a 2-byte Index: src/sqliteInt.h ================================================================== --- src/sqliteInt.h +++ src/sqliteInt.h @@ -4318,7 +4318,9 @@ int sqlite3ExprVectorSize(Expr *pExpr); int sqlite3ExprIsVector(Expr *pExpr); Expr *sqlite3VectorFieldSubexpr(Expr*, int); Expr *sqlite3ExprForVectorField(Parse*,Expr*,int); void sqlite3VectorErrorMsg(Parse*, Expr*); + +sqlite3_uint64 sqlite3PerfCnt; #endif /* SQLITEINT_H */ Index: src/vdbe.c ================================================================== --- src/vdbe.c +++ src/vdbe.c @@ -504,11 +504,12 @@ /* ** hwtime.h contains inline assembler code for implementing ** high-performance timing routines. */ -#include "hwtime.h" +/*#include "hwtime.h"*/ +#define sqlite3Hwtime(x) sqlite3PerfCnt #endif #ifndef NDEBUG /*