Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/test/speedtest.md # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / test / speedtest.md` 54 lines ยท 2325 bytes Raw Blame History Rendered 1 # Performance And Size Measurements 2 3 This document shows a procedure for making performance and size 4 comparisons between two versions of the SQLite Amalgamation "sqlite3.c". 5 You will need: 6 7 * fossil 8 * valgrind 9 * tclsh 10 * A script or program named "open" that brings up *.txt files in an 11 editor for viewing. (Macs provide this by default. On Linux it's 12 called xdg-open and some distributions symlink it to "open". You'll 13 need to come up with your own on Windows.) 14 * An SQLite source tree 15 16 The procedure described in this document is not the only way to make 17 performance and size measurements. Use this as a guide and make 18 adjustments as needed. 19 20 ## Establish the baseline measurement 21 22 * Begin at the root the SQLite source tree 23 * mkdir -p ../speed
24 ↑ Speed measurement output files will go into this directory. 25 You can actually put those files wherever you want. This is just a 26 suggestion. It might be good to keep these files outside of the 27 source tree so that "fossil clean" does not delete them. 28 * Obtain the baseline SQLite amalgamation. For the purpose of this 29 technical note, assume the baseline SQLite sources are in files 30 "../baseline/sqlite3.c" and "../baseline/sqlite3.h". 31 * test/speedtest.tcl ../baseline/sqlite3.c ../speed/baseline.txt
32 ↑ The performance measure will be written into ../speed/baseline.txt 33 and that file will be brought up in an editor for easy viewing.
34 ↑ The "sqlite3.h" will be taken from the directory that contains 35 the "sqlite3.c" amalgamation file. 36 37 ## Comparing the current checkout against the baseline 38 39 * make sqlite3.c 40 * test/speedtest.tcl sqlite3.c ../speed/test.txt ../speed/baseline.txt
41 ↑ Test results written into ../speed/test.txt and then 42 "fossil xdiff" is run to compare ../speed/baseline.txt against 43 the new test results. 44 45 ## When to do this 46 47 Performance and size checks should be done prior to trunk check-ins. 48 Sometimes a seemingly innocuous change can have large performance 49 impacts. A large impact does not mean that the change cannot continue, 50 but it is important to be aware of the impact. 51 52 ## Additional hints 53 54 Use the --help option to test/speedtest.tcl to see other available options.