Index: tool/spaceanal.tcl ================================================================== --- tool/spaceanal.tcl +++ tool/spaceanal.tcl @@ -41,10 +41,29 @@ set true_file_size [file size $file_to_analyze] if {$true_file_size<512} { puts stderr "Empty or malformed database: $file_to_analyze" exit 1 } + +# Compute the total file size assuming test_multiplexor is being used. +# Assume that SQLITE_ENABLE_8_3_NAMES might be enabled +# +set extension [file extension $file_to_analyze] +set pattern $file_to_analyze +append pattern {[0-9][0-9]} +foreach f [glob -nocomplain $pattern] { + incr true_file_size [file size $f] + set extension {} +} +if {[string length $extension]>=2 && [string length $extension]<=4} { + set pattern [file rootname $file_to_analyze] + append pattern [string range $extension 0 1] + append pattern {[0-9][0-9]} + foreach f [glob -nocomplain $pattern] { + incr true_file_size [file size $f] + } +} # Open the database # sqlite3 db $file_to_analyze register_dbstat_vtab db