/ Check-in [272c1a6e]
Login

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

Overview
Comment:Improvements to the speed tests recently added to the test suite. (CVS 3519)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:272c1a6e61d053121b5412564948dad4366b5727
User & Date: drh 2006-11-23 21:09:11
Context
2006-11-29
01:02
Delta-encode terms in interior nodes. While experiments have shown that this is of marginal utility when encoding terms resulting from regular English text, it turns out to be very useful when encoding inputs with very large terms. (CVS 3520) check-in: c8151a99 user: shess tags: trunk
2006-11-23
21:09
Improvements to the speed tests recently added to the test suite. (CVS 3519) check-in: 272c1a6e user: drh tags: trunk
11:59
Fix a typo in the OMIT_AUTORIZATION in expr.c. (CVS 3518) check-in: 3dea7fbe user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/all.test.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
52
53
54
55
56
57
58

59
60
61
62
63
64
65
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: all.test,v 1.35 2006/01/17 15:36:33 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
rename finish_test really_finish_test
proc finish_test {} {memleak_check}

if {[file exists ./sqlite_test_count]} {
................................................................................
  async.test
  crash.test
  autovacuum_crash.test
  quick.test
  malloc.test
  misuse.test
  memleak.test

}

# Files to include in the test.  If this list is empty then everything
# that is not in the EXCLUDE list is run.
#
set INCLUDE {
}







|







 







>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: all.test,v 1.36 2006/11/23 21:09:11 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
rename finish_test really_finish_test
proc finish_test {} {memleak_check}

if {[file exists ./sqlite_test_count]} {
................................................................................
  async.test
  crash.test
  autovacuum_crash.test
  quick.test
  malloc.test
  misuse.test
  memleak.test
  speed1.test
}

# Files to include in the test.  If this list is empty then everything
# that is not in the EXCLUDE list is run.
#
set INCLUDE {
}

Changes to test/quick.test.

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
46
47
48
49
50
51
52

53
54
55
56
57
58
59
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: quick.test,v 1.46 2006/11/09 00:24:55 drh Exp $

proc lshift {lvar} {
  upvar $lvar l
  set ret [lindex $l 0]
  set l [lrange $l 1 end]
  return $ret
}
................................................................................
  loadext.test
  malloc.test
  malloc2.test
  malloc3.test
  memleak.test
  misuse.test
  quick.test


  autovacuum_crash.test
  btree8.test
  utf16.test
  shared_err.test
  vtab_err.test
}







|







 







>







2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: quick.test,v 1.47 2006/11/23 21:09:11 drh Exp $

proc lshift {lvar} {
  upvar $lvar l
  set ret [lindex $l 0]
  set l [lrange $l 1 end]
  return $ret
}
................................................................................
  loadext.test
  malloc.test
  malloc2.test
  malloc3.test
  memleak.test
  misuse.test
  quick.test
  speed1.test

  autovacuum_crash.test
  btree8.test
  utf16.test
  shared_err.test
  vtab_err.test
}

Changes to test/tester.tcl.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134


135
136
137
138
139
140
141
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.70 2006/11/23 09:39:16 drh Exp $

# Make sure tclsqlite3 was compiled correctly.  Abort now with an
# error message if not.
#
if {[sqlite3 -tcl-uses-utf]} {
  if {"\u1234"=="u1234"} {
    puts stderr "***** BUILD PROBLEM *****"
................................................................................
    puts " Ok"
  }
}

# Run an SQL script.  
# Return the number of microseconds per statement.
#
proc speed_trial {name numstmt sql} {
  puts -nonewline [format {%-20.20s } $name...]
  flush stdout
  set speed [time {sqlite3_exec_nr db $sql}]
  set tm [lindex $speed 0]
  set per [expr {$tm/(1.0*$numstmt)}]
  set rate [expr {1000000.0*$numstmt/$tm}]
  puts [format {%20.1f us/stmt %20.5f stmt/s} $per $rate]


}

# The procedure uses the special "sqlite_malloc_stat" command
# (which is only available if SQLite is compiled with -DSQLITE_DEBUG=1)
# to see how many malloc()s have not been free()ed.  The number
# of surplus malloc()s is stored in the global variable $::Leak.
# If the value in $::Leak grows, it may mean there is a memory leak







|







 







|






|
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.71 2006/11/23 21:09:11 drh Exp $

# Make sure tclsqlite3 was compiled correctly.  Abort now with an
# error message if not.
#
if {[sqlite3 -tcl-uses-utf]} {
  if {"\u1234"=="u1234"} {
    puts stderr "***** BUILD PROBLEM *****"
................................................................................
    puts " Ok"
  }
}

# Run an SQL script.  
# Return the number of microseconds per statement.
#
proc speed_trial {name numstmt units sql} {
  puts -nonewline [format {%-20.20s } $name...]
  flush stdout
  set speed [time {sqlite3_exec_nr db $sql}]
  set tm [lindex $speed 0]
  set per [expr {$tm/(1.0*$numstmt)}]
  set rate [expr {1000000.0*$numstmt/$tm}]
  set u1 us/$units
  set u2 $units/s
  puts [format {%20.3f %-7s %20.5f %s} $per $u1 $rate $u2]
}

# The procedure uses the special "sqlite_malloc_stat" command
# (which is only available if SQLite is compiled with -DSQLITE_DEBUG=1)
# to see how many malloc()s have not been free()ed.  The number
# of surplus malloc()s is stored in the global variable $::Leak.
# If the value in $::Leak grows, it may mean there is a memory leak