Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Still more #if SQLITE_VERSION_NUMBER macros in test/speedtest1.c to enable compilation against older versions of SQLite. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4b20cf4206ac12975ca9c4ec7ef76aa2 |
User & Date: | drh 2013-12-02 01:24:05.116 |
Context
2013-12-02
| ||
21:25 | Another #if SQLITE_VERSION_NUMBER macro in speedtest1.c for compatibility with older versions of SQLite. (check-in: bc8eacc7f7 user: drh tags: trunk) | |
01:24 | Still more #if SQLITE_VERSION_NUMBER macros in test/speedtest1.c to enable compilation against older versions of SQLite. (check-in: 4b20cf4206 user: drh tags: trunk) | |
2013-12-01
| ||
18:10 | Add some #if SQLITE_VERSION_NUMBER macros to test/speedtest1.c in order to make it compatible with older versions of SQLite so that it can be used for historical speed comparisons. (check-in: a9e1627ae7 user: drh tags: trunk) | |
Changes
Changes to test/speedtest1.c.
︙ | ︙ | |||
133 134 135 136 137 138 139 140 141 | } /* Return the current wall-clock time, in milliseconds */ sqlite3_int64 speedtest1_timestamp(void){ static sqlite3_vfs *clockVfs = 0; sqlite3_int64 t; if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0); if( clockVfs->iVersion>=2 && clockVfs->xCurrentTimeInt64!=0 ){ clockVfs->xCurrentTimeInt64(clockVfs, &t); | > | > > | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | } /* Return the current wall-clock time, in milliseconds */ sqlite3_int64 speedtest1_timestamp(void){ static sqlite3_vfs *clockVfs = 0; sqlite3_int64 t; if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0); #if SQLITE_VERSION_NUMBER>=3007000 if( clockVfs->iVersion>=2 && clockVfs->xCurrentTimeInt64!=0 ){ clockVfs->xCurrentTimeInt64(clockVfs, &t); }else #endif { double r; clockVfs->xCurrentTime(clockVfs, &r); t = (sqlite3_int64)(r*86400000.0); } return t; } |
︙ | ︙ | |||
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 | sqlite3_close(g.db); /* Global memory usage statistics printed after the database connection ** has closed. Memory usage should be zero at this point. */ if( showStats ){ sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHi, 0); printf("-- Memory Used (bytes): %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHi, 0); printf("-- Outstanding Allocations: %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHi, 0); printf("-- Pcache Overflow Bytes: %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHi, 0); printf("-- Scratch Overflow Bytes: %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHi, 0); printf("-- Largest Allocation: %d bytes\n",iHi); sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHi, 0); | > > | 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | sqlite3_close(g.db); /* Global memory usage statistics printed after the database connection ** has closed. Memory usage should be zero at this point. */ if( showStats ){ sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHi, 0); printf("-- Memory Used (bytes): %d (max %d)\n", iCur,iHi); #if SQLITE_VERSION_NUMBER>=3007000 sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHi, 0); printf("-- Outstanding Allocations: %d (max %d)\n", iCur,iHi); #endif sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHi, 0); printf("-- Pcache Overflow Bytes: %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHi, 0); printf("-- Scratch Overflow Bytes: %d (max %d)\n", iCur,iHi); sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHi, 0); printf("-- Largest Allocation: %d bytes\n",iHi); sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHi, 0); |
︙ | ︙ |