From 4e92d998ebfea666fec1ffcb3b5e44bf6d2d67fd Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Fri, 5 May 2023 12:34:18 +0000 Subject: Minor fixes for perf tests --- tests-perf/listPerf.tcl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests-perf/listPerf.tcl b/tests-perf/listPerf.tcl index 17f22e9..575c78e 100644 --- a/tests-perf/listPerf.tcl +++ b/tests-perf/listPerf.tcl @@ -3,8 +3,9 @@ # # listPerf.tcl -- # -# This file provides performance tests for list operations. -# +# This file provides performance tests for list operations. Run +# tclsh listPerf.tcl help +# for options. # ------------------------------------------------------------------------ # # See the file "license.terms" for information on usage and redistribution @@ -77,7 +78,9 @@ namespace eval perf::list { break } --* { - error "Unknown option $arg" + puts stderr "Unknown option $arg" + print_usage + exit 1 } default { # Remaining will be passed back to the caller @@ -383,6 +386,8 @@ namespace eval perf::list { comment Create a list from two lists - real test of expansion speed perf measure [list_describe $len "from a {*}list {*}list"] {list {*}$L {*}$L} [list len [expr {$len/2}]] } + + perf destroy } proc lappend_describe {share_mode len num iters} { @@ -1217,7 +1222,7 @@ namespace eval perf::list { set commands [lmap sel $selections { if {$sel eq "help"} { print_usage - continue + exit 0 } set cmd ::perf::list::${sel}_perf if {$cmd ni [info commands ::perf::list::*_perf]} { -- cgit v0.12