summaryrefslogtreecommitdiffstats
path: root/tests-perf
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-05-05 12:34:18 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-05-05 12:34:18 (GMT)
commit4e92d998ebfea666fec1ffcb3b5e44bf6d2d67fd (patch)
treecb34d635b1ab4bc0544130ed9493d7f22b8ea764 /tests-perf
parent1ea2b16a8d3d0acaef2a941a553139d829533445 (diff)
downloadtcl-4e92d998ebfea666fec1ffcb3b5e44bf6d2d67fd.zip
tcl-4e92d998ebfea666fec1ffcb3b5e44bf6d2d67fd.tar.gz
tcl-4e92d998ebfea666fec1ffcb3b5e44bf6d2d67fd.tar.bz2
Minor fixes for perf tests
Diffstat (limited to 'tests-perf')
-rw-r--r--tests-perf/listPerf.tcl13
1 files 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]} {