Lighttpd - HTTPStates

来源:互联网 发布:智能康复知多少 编辑:程序博客网 时间:2024/05/21 08:51

第一次接触graphviz,看起来挺简单方便的,以后画状态图之类的可以考虑一下。


把下面代码保存为HTTPStates.dot

#!graphvizdigraph state {    edge [color=green];    connect -> reqstart -> read -> reqend -> handlereq -> respstart -> write -> respend -> connect;    edge [color=grey];    reqend -> readpost -> handlereq [ label="POST" ];    edge [ color=blue];    respend -> reqstart [ label="keep-alive" ];    edge [ color=lightblue];    handlereq -> handlereq [ label="sub-request" ];    edge [style=dashed, color=red];    error -> close -> connect;    error -> connect;    handlereq -> error;    read -> error;    readpost -> error;    write -> error;    connect [shape=box];}


编译一下:
$dot -Tpng HTTPStates.dot -o HTTPStats.png


就可以得到Lighttpd的状态转换图了。