aboutsummaryrefslogtreecommitdiff
path: root/tool/vdbe_profile.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vdbe_profile.tcl')
-rw-r--r--tool/vdbe_profile.tcl6
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/vdbe_profile.tcl b/tool/vdbe_profile.tcl
index a0dc99ec3..b7240e356 100644
--- a/tool/vdbe_profile.tcl
+++ b/tool/vdbe_profile.tcl
@@ -66,6 +66,8 @@ foreach stmt $allstmt {
puts "********************************************************************"
puts [string trim $sql($stmt)]
puts "Execution count: $cnt($stmt)"
+ set tcx 0
+ set ttx 0
for {set i 0} {[info exists stat($stmt,$i)]} {incr i} {
foreach {cx tx detail} $stat($stmt,$i) break
if {$cx==0} {
@@ -74,7 +76,11 @@ foreach stmt $allstmt {
set ax [expr {$tx/$cx}]
}
puts [format {%8d %12d %12d %4d %s} $cx $tx $ax $i $detail]
+ incr tcx $cx
+ incr ttx $tx
}
+ set tax [expr {$tcx>0?$ttx/$tcx:0}]
+ puts [format {%8d %12d %12d TOTAL} $tcx $ttx $tax]
}
puts "********************************************************************"
puts "OPCODES:"