As confirmed by laptop mode tools' changelog, my patch is finally merged into their core code. I simply contribute few line to show statistics regarding write and read frequency of every programs recorded during lm-profiler's runtime.
So, how the code looks like?
Looks awful? I admit it. In short, it grabs files created by lm-profiler during its run time, trims out the blanks and then sort them, while at the same time showing their frequencies ascendingly.
—- lm-profiler.old2009-06-03 21:12:52.000000000 +0700
+++ lm-profiler2009-06-26 21:08:54.000000000 +0700
@ -209,6 +209,11@
printf ’\r \r’
+echo “Write frequency : ”; cat $WORKDIR/write_accesses_* | sed -e ’s/[ \t]*//;s/[ \t]*$//’ -e ’/$/ d’ | sort | uniq -c | sort -n
+echo “Read frequency : ”; cat $WORKDIR/read_accesses_* | sed -e ’s/[ \t]*//;s/[ \t]*$//’ -e ’/$/ d’ | sort | uniq -c | sort -n
echo “Profiling run completed.”
NB: Actually it's for my own reminder, but to share with you all. To easily convert text to HTML (and dealing with all those escape characters etc), you could use http://www.textism.com/tools/textile/index.php. Simply paste your text there and click the button, voila..you get the HTML-ized text!