Mercurial > hg > Members > tatsuki > Alice
view scripts/log.rb @ 226:6d546924eea0
sort is success but it has bug
author | sugi |
---|---|
date | Thu, 28 Mar 2013 21:05:39 +0900 |
parents | 92aeb6e34683 |
children |
line wrap: on
line source
log_file = ARGV[0] puts "digraph test {" open(log_file) { |io| while line = io.gets data = line.split("\t") header = data[0].split(" ") if header[2] != "DEBUG" then next end if header[3] == "alice.codesegment.CodeSegmentManager" then next end if header[5] == "TAKE" || header[5] == "PEEK" then puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]' print '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]' print '"' + header[3] + "." + data[1] + '"' print " -> " print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' puts ' [label="' + header[5] + '", fontname="Ricty"]' end if header[5] == "PUT" || header[5] == "UPDATE" then puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]' puts '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]' print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' print " -> " print '"' + header[3] + "." + data[1] + '"' puts ' [label="' + header[5] + '", fontname="Ricty"]' end end } puts "}"