/ Check-in [55d29839]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add more detail to the header command to further explain how to compile and use the kvtest.c utility.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | kvtest
Files: files | file ages | folders
SHA1: 55d29839c9fafe9e6a694f5790151d1f22396b01
User & Date: drh 2016-12-29 16:49:22
Context
2016-12-29
16:58
Add the kvtest.c test program used to show that it is many times faster to read thumbnail and similar BLOBs out of an SQLite database than it is to read them as separate files from the filesystem. check-in: 8074d59c user: drh tags: trunk
16:49
Add more detail to the header command to further explain how to compile and use the kvtest.c utility. Closed-Leaf check-in: 55d29839 user: drh tags: kvtest
16:18
Fix kvtest.c so that it compiles using MSVC. check-in: e2bbeae7 user: drh tags: kvtest
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/kvtest.c.

    11     11   *************************************************************************
    12     12   **
    13     13   ** This file implements "key-value" performance test for SQLite.  The
    14     14   ** purpose is to compare the speed of SQLite for accessing large BLOBs
    15     15   ** versus reading those same BLOB values out of individual files in the
    16     16   ** filesystem.
    17     17   **
    18         -** Run "kvtest --help" for further information, or see comments below.
           18  +** Run "kvtest" with no arguments for on-line help, or see comments below.
           19  +**
           20  +** HOW TO COMPILE:
           21  +**
           22  +** (1) Gather this source file and a recent SQLite3 amalgamation with its
           23  +**     header into the working directory.  You should have:
           24  +**
           25  +**          kvtest.c       >--- this file
           26  +**          sqlite3.c      \___ SQLite
           27  +**          sqlite3.h      /    amlagamation & header
           28  +**
           29  +** (2) Run you compiler against the two C source code files.
           30  +**
           31  +**    (a) On linux or mac:
           32  +**
           33  +**        OPTS="-DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION"
           34  +**        gcc -Os -I. $OPTS kvtest.c sqlite3.c -o kvtest
           35  +**
           36  +**             The $OPTS options can be omitted.  The $OPTS merely omit
           37  +**             the need to link against -ldl and -lpthread, or whatever
           38  +**             the equivalent libraries are called on your system.
           39  +**
           40  +**    (b) Windows with MSVC:
           41  +**
           42  +**        cl -I. kvtest.c sqlite3.c
           43  +**
           44  +** USAGE:
           45  +**
           46  +** (1) Create a test database by running "kvtest init" with appropriate
           47  +**     options.  See the help message for available options.
           48  +**
           49  +** (2) Construct the corresponding pile-of-files database on disk using
           50  +**     the "kvtest export" command.
           51  +**
           52  +** (3) Run tests using "kvtest run" against either the SQLite database or
           53  +**     the pile-of-files database and with appropriate options.
           54  +**
           55  +** For example:
           56  +**
           57  +**       ./kvtest init x1.db --count 100000 --size 10000
           58  +**       mkdir x1
           59  +**       ./kvtest export x1.db x1
           60  +**       ./kvtest run x1.db --count 10000 --max-id 1000000
           61  +**       ./kvtest run x1 --count 10000 --max-id 1000000
    19     62   */
    20     63   static const char zHelp[] = 
    21     64   "Usage: kvhelp COMMAND ARGS...\n"
    22     65   "\n"
    23     66   "   kvhelp init DBFILE --count N --size M --pagesize X\n"
    24     67   "\n"
    25     68   "        Generate a new test database file named DBFILE containing N\n"