summaryrefslogtreecommitdiffstats
path: root/tools/tsdPerf.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tsdPerf.tcl')
-rw-r--r--tools/tsdPerf.tcl24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/tsdPerf.tcl b/tools/tsdPerf.tcl
new file mode 100644
index 0000000..360ca9c
--- /dev/null
+++ b/tools/tsdPerf.tcl
@@ -0,0 +1,24 @@
+
+package require Thread
+
+set ::tids [list]
+for {set i 0} {$i < 4} {incr i} {
+ lappend ::tids [thread::create [string map [list IVALUE $i] {
+ set curdir [file dirname [info script]]
+ load [file join $curdir tsdPerf[info sharedlibextension]]
+
+ while 1 {
+ tsdPerfSet IVALUE
+ }
+ }]]
+}
+
+puts TIDS:$::tids
+
+set curdir [file dirname [info script]]
+load [file join $curdir tsdPerf[info sharedlibextension]]
+
+tsdPerfSet 1234
+while 1 {
+ puts "TIME:[time {set value [tsdPerfGet]} 1000] VALUE:$value"
+}