AryaWu/sqlite
0
1# Performance And Size Measurements2 3This document shows a procedure for making performance and size4comparisons between two versions of the SQLite Amalgamation "sqlite3.c".5You will need:6 7 * fossil8 * valgrind9 * tclsh10 * A script or program named "open" that brings up *.txt files in an11 editor for viewing. (Macs provide this by default. You'll need to12 come up with your own on Linux and Windows.)13 * An SQLite source tree14 15The procedure described in this document is not the only way to make16performance and size measurements. Use this as a guide and make17adjustments as needed.18 19## Establish the baseline measurement20 21 * Begin at the root the SQLite source tree22 * <b>mkdir -p ../speed</b> <br>23 ↑ Speed measurement output files will go into this directory.24 You can actually put those files wherever you want. This is just a25 suggestion. It might be good to keep these files outside of the26 source tree so that "fossil clean" does not delete them.27 * Obtain the baseline SQLite amalgamation. For the purpose of this28 technical note, assume the baseline SQLite sources are in files29 "../baseline/sqlite3.c" and "../baseline/sqlite3.h".30 * <b>test/speedtest.tcl ../baseline/sqlite3.c ../speed/baseline.txt</b> <br>31 ↑ The performance measure will be written into ../speed/baseline.txt32 and that file will be brought up in an editor for easy viewing. <br>33 ↑ The "sqlite3.h" will be taken from the directory that contains34 the "sqlite3.c" amalgamation file.35 36## Comparing the current checkout against the baseline37 38 * <b>make sqlite3.c</b>39 * <b>test/speedtest.tcl sqlite3.c ../speed/test.txt ../speed/baseline.txt</b> <br>40 ↑ Test results written into ../speed/test.txt and then41 "fossil xdiff" is run to compare ../speed/baseline.txt against42 the new test results.43 44## When to do this45 46Performance and size checks should be done prior to trunk check-ins.47Sometimes a seemingly innocuous change can have large performance48impacts. A large impact does not mean that the change cannot continue,49but it is important to be aware of the impact.50 51## Additional hints52 53Use the --help option to test/speedtest.tcl to see other available options.54 