diff options
author | drh <drh@noemail.net> | 2010-07-29 10:07:21 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-07-29 10:07:21 +0000 |
commit | df0db0feb5da4b795b48e628918399a3bb8b0d08 (patch) | |
tree | 067e70684c8bc6ad7c7429b4a005c808eda30045 /src | |
parent | 6cbda64d07945dfeb8a25fdd36d6f527ddd37415 (diff) | |
download | sqlite-df0db0feb5da4b795b48e628918399a3bb8b0d08.tar.gz sqlite-df0db0feb5da4b795b48e628918399a3bb8b0d08.zip |
Change the profile timer units back to nanoseconds and update the
sqlite3_profile() documentation.
Ticket [c43940c49b74c70a69]
FossilOrigin-Name: 7783b98a938b77d6b8e4e85b32b05452c47fbe4b
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite.h.in | 8 | ||||
-rw-r--r-- | src/vdbeapi.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 286ff5990..57910ee32 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -2171,7 +2171,13 @@ int sqlite3_set_authorizer( ** ^The callback function registered by sqlite3_profile() is invoked ** as each SQL statement finishes. ^The profile callback contains ** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. +** of how long that statement took to run. ^The profile callback +** time is in units of nanoseconds, however the current implementation +** is only capable of millisecond resolution so the six least significant +** digits in the time are meaningless. Future versions of SQLite +** might provide greater resolution on the profiler callback. The +** sqlite3_profile() function is considered experimental and is +** subject to change in future versions of SQLite. */ void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 2f5aaa36d..afb4a1b6e 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -398,7 +398,7 @@ static int sqlite3Step(Vdbe *p){ if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){ sqlite3_int64 iNow; sqlite3OsCurrentTimeInt64(db->pVfs, &iNow); - db->xProfile(db->pProfileArg, p->zSql, iNow - p->startTime); + db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000); } #endif |