diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-25 10:14:01 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-04-25 10:14:01 +0200 |
commit | 2cf22958352bdffbc068413fa42b8df53ae3e41a (patch) | |
tree | 926f5b6696c99bee22b84e91db4fc09b7736d0ea /misc/dmenu-performancetest-bench.sh | |
parent | 000f998a3b548b289db5347f91874fe6c7f21c7f (diff) |
simple bench scripts for dmenu/awk/sort/..
Diffstat (limited to 'misc/dmenu-performancetest-bench.sh')
-rwxr-xr-x | misc/dmenu-performancetest-bench.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/misc/dmenu-performancetest-bench.sh b/misc/dmenu-performancetest-bench.sh new file mode 100755 index 0000000..c06df46 --- /dev/null +++ b/misc/dmenu-performancetest-bench.sh @@ -0,0 +1,17 @@ +#!/bin/bash +echo "Run this test more then once. the first read on the file may be uncached. after that, the file is in Linux' block cache" + +echo "Plain awk '{print \$3}':" +time awk '{print $3}' dummy_history_file >/dev/null + +echo "awk + sort" +time awk '{print $3}' dummy_history_file | sort >/dev/null +echo "awk + sort + uniq" +time awk '{print $3}' dummy_history_file | sort | uniq >/dev/null + +echo "Plain dmenu:" +dmenu < dummy_history_file +echo "awked into dmenu:" +awk '{print $3}' dummy_history_file | dmenu +echo "awk + sort + uniq into dmenu:" +awk '{print $3}' dummy_history_file | sort | uniq | dmenu |