summaryrefslogtreecommitdiffstats
path: root/tests/langbench/hash.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/langbench/hash.tcl')
-rw-r--r--tests/langbench/hash.tcl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/langbench/hash.tcl b/tests/langbench/hash.tcl
new file mode 100644
index 0000000..0b1afa8
--- /dev/null
+++ b/tests/langbench/hash.tcl
@@ -0,0 +1,17 @@
+proc main {} {
+ global argv
+
+ set d [dict create]
+ foreach file $argv {
+ set f [open $file rb]
+ while {[gets $f buf] >= 0} {
+ dict set d $buf 1
+ }
+ close $f
+ }
+}
+main
+set f [open "/proc/[pid]/status"]
+while {[gets $f buf] >= 0} {
+ if {[regexp {^Vm[RD]} $buf]} { puts $buf }
+}