void* sqlite3_profile( sqlite3* db, profile_func, void* udp ); void profile_func( void* udp, const char* sql, sqlite3_uint64 time );
db
A database connection.
profile_func
An application-defined profile callback function.
udp
An application-defined user-data pointer. This value is made available to the profile function.
sql
The text of the SQL statement that was executed, encoded in UTF-8.
time
The wall-clock time required to execute the statement, in nanoseconds. Most system clocks cannot actually provide nanosecond precision.
sqlite3_profile()
)The udp
parameter of any prior profile function. If no
prior profile function was registered, a NULL will
be returned.
This function allows an application to register a profiling
function. The callback function is called every time a call to
sqlite3_step()
finishes. Only one profile function is allowed. Registering a
new function will override the old function. To unregister a
profiling function, pass in a NULL function pointer.