Difference between revisions of "Splot"

From HaskellWiki
Jump to navigation Jump to search
 
Line 36: Line 36:
   
 
And here's what we get:
 
And here's what we get:
  +
 
http://www.haskell.org/sitewiki/images/d/d1/Splot-small.png
 
http://www.haskell.org/sitewiki/images/d/d1/Splot-small.png
   
 
A couple of real-world examples:
 
A couple of real-world examples:
  +
 
http://www.haskell.org/sitewiki/images/thumb/a/a3/Splot-big.png/626px-Splot-big.png
 
http://www.haskell.org/sitewiki/images/thumb/a/a3/Splot-big.png/626px-Splot-big.png
  +
 
(several thousand processes calling memcached; stages are: green is "connecting", yellow is "reading data", red is "retrying after a network error")
 
(several thousand processes calling memcached; stages are: green is "connecting", yellow is "reading data", red is "retrying after a network error")
   
 
http://www.haskell.org/sitewiki/images/8/83/Splot-single-task.png
 
http://www.haskell.org/sitewiki/images/8/83/Splot-single-task.png
  +
 
Running 160 approx.equal-length tasks on a 160-core cluster.
 
Running 160 approx.equal-length tasks on a 160-core cluster.

Revision as of 07:20, 21 October 2010

Help

splot - a tool for visualizing the lifecycle of many concurrent multi-stage processes. See http://www.haskell.org/haskellwiki/Splot 
Usage: splot [-o PNGFILE] [-w WIDTH] [-h HEIGHT] [-bh BARHEIGHT] [-tf TIMEFORMAT]
             [-tickInterval TICKINTERVAL]
  -o PNGFILE    - filename to which the output will be written in PNG format.
                  If omitted, it will be shown in a window.
  -w, -h        - width and height of the resulting picture. Default 640x480.
  -bh           - height of the bar depicting each individual process. Default 5 pixels.
                  Use 1 or so if you have a lot of them.
  -tf           - time format, as in http://linux.die.net/man/3/strptime but with 
                  fractional seconds supported via %OS - will parse 12.4039 or 12,4039
  -tickInterval - ticks on the X axis will be this often (in millis).

Input is read from stdin. Example input (speaks for itself):
2010-10-21 16:45:09,431 >foo green
2010-10-21 16:45:09,541 >bar green
2010-10-21 16:45:10,631 >foo yellow
2010-10-21 16:45:10,725 >foo red
2010-10-21 16:45:10,930 >bar blue
2010-10-21 16:45:11,322 <foo
2010-10-21 16:45:12,508 <bar
'>FOO COLOR' means 'start a bar of color COLOR on track FOO',
'<FOO' means 'end the current bar for FOO'.


> cat <<END |splot -tickInterval 100
2010-10-21 16:45:09,431 >foo green
2010-10-21 16:45:09,541 >bar green
2010-10-21 16:45:10,631 >foo yellow
2010-10-21 16:45:10,725 >foo red
2010-10-21 16:45:10,930 >bar blue
2010-10-21 16:45:11,322 <foo
2010-10-21 16:45:12,508 <bar

And here's what we get:

Splot-small.png

A couple of real-world examples:

626px-Splot-big.png

(several thousand processes calling memcached; stages are: green is "connecting", yellow is "reading data", red is "retrying after a network error")

Splot-single-task.png

Running 160 approx.equal-length tasks on a 160-core cluster.