Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: third_party/sqlite/src/tool/vdbe_profile.tcl

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/tool/varint.c ('k') | third_party/sqlite/src/tool/warnings.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/tclsh 1 #!/bin/tclsh
2 # 2 #
3 # SUMMARY:
3 # Run this script in the same directory as the "vdbe_profile.out" file. 4 # Run this script in the same directory as the "vdbe_profile.out" file.
4 # This script summarizes the results contained in that file. 5 # This script summarizes the results contained in that file.
5 # 6 #
7 # DETAILS:
8 # Compile SQLite using the -DVDBE_PROFILE option on Linux. This causes
9 # performance information about individual VDBE operations to be appended
10 # to the "vdbe_profile.out" file. After content has been accumulated in
11 # vdbe_profile.out, run this script to analyze the output and generate a
12 # report.
13 #
6 if {![file readable vdbe_profile.out]} { 14 if {![file readable vdbe_profile.out]} {
7 error "run this script in the same directory as the vdbe_profile.out file" 15 error "run this script in the same directory as the vdbe_profile.out file"
8 } 16 }
9 set in [open vdbe_profile.out r] 17 set in [open vdbe_profile.out r]
10 set stmt {} 18 set stmt {}
11 set allstmt {} 19 set allstmt {}
12 while {![eof $in]} { 20 while {![eof $in]} {
13 set line [gets $in] 21 set line [gets $in]
14 if {$line==""} continue 22 if {$line==""} continue
15 if {[regexp {^---- } $line]} { 23 if {[regexp {^---- } $line]} {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 foreach op [lsort [array names opcnt]] { 81 foreach op [lsort [array names opcnt]] {
74 set cx $opcnt($op) 82 set cx $opcnt($op)
75 set tx $opcycle($op) 83 set tx $opcycle($op)
76 if {$cx==0} { 84 if {$cx==0} {
77 set ax 0 85 set ax 0
78 } else { 86 } else {
79 set ax [expr {$tx/$cx}] 87 set ax [expr {$tx/$cx}]
80 } 88 }
81 puts [format {%8d %12d %12d %s} $cx $tx $ax $op] 89 puts [format {%8d %12d %12d %s} $cx $tx $ax $op]
82 } 90 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/tool/varint.c ('k') | third_party/sqlite/src/tool/warnings.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698