/ Check-in [61eeb48f]
Login

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

Overview
Comment:Add more tests for the profile output of the Tcl trace_v2 method.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 61eeb48f03f8a9a32330a5cae4387bb4e5618078cf669a5831910f99126900ec
User & Date: mistachkin 2018-03-10 20:45:44
Context
2018-03-12
21:09
Fix a typo causing SQLITE_LOG_CACHE_SPILL builds to fail. check-in: 0171d4a7 user: dan tags: trunk
2018-03-10
20:45
Add more tests for the profile output of the Tcl trace_v2 method. check-in: 61eeb48f user: mistachkin tags: trunk
20:25
Fix the second callback argument to the "profile" response of the "trace_v2" method in the TCL interface so that it shows the actual number of nanoseconds for the command, not the address of the variable containing the number of nanoseconds. check-in: 8f9a1251 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/trace3.test.

   116    116     set ::stmtlist(record) {}
   117    117     db trace_v2 trace_v2_record 2
   118    118     execsql {
   119    119       SELECT a, b FROM t1 ORDER BY a;
   120    120     }
   121    121     set ::stmtlist(record)
   122    122   } {/^\{-?\d+ -?\d+\}$/}
          123  +
          124  +do_test trace3-4.3 {
          125  +  set ::stmtlist(record) {}
          126  +  db trace_v2 trace_v2_record profile
          127  +  execsql {
          128  +    SELECT a, b FROM t1 ORDER BY a;
          129  +  }
          130  +  set stmt [lindex [lindex $::stmtlist(record) 0] 0]
          131  +  set ns [lindex [lindex $::stmtlist(record) 0] 1]
          132  +  list $stmt [expr {$ns >= 0 && $ns <= 1000000}]; # less than 0.001 second
          133  +} {/^-?\d+ 1$/}
          134  +do_test trace3-4.4 {
          135  +  set ::stmtlist(record) {}
          136  +  db trace_v2 trace_v2_record 2
          137  +  execsql {
          138  +    SELECT a, b FROM t1 ORDER BY a;
          139  +  }
          140  +  set stmt [lindex [lindex $::stmtlist(record) 0] 0]
          141  +  set ns [lindex [lindex $::stmtlist(record) 0] 1]
          142  +  list $stmt [expr {$ns >= 0 && $ns <= 1000000}]; # less than 0.001 second
          143  +} {/^-?\d+ 1$/}
   123    144   
   124    145   do_test trace3-5.1 {
   125    146     set ::stmtlist(record) {}
   126    147     db trace_v2 trace_v2_record row
   127    148     execsql {
   128    149       SELECT a, b FROM t1 ORDER BY a;
   129    150     }