40
|
1 log_file = ARGV[0]
|
|
2 puts "digraph test {"
|
|
3 open(log_file) { |io|
|
|
4 while line = io.gets
|
|
5 data = line.split("\t")
|
|
6 header = data[0].split(" ")
|
|
7 if header[2] != "DEBUG" then
|
|
8 next
|
|
9 end
|
|
10 if header[3] == "alice.codesegment.CodeSegmentManager" then
|
|
11 next
|
|
12 end
|
|
13 if header[5] == "TAKE" || header[5] == "PEEK" then
|
|
14 puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]'
|
42
|
15 print '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]'
|
40
|
16 print '"' + header[3] + "." + data[1] + '"'
|
|
17 print " -> "
|
|
18 print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"'
|
|
19
|
|
20 puts ' [label="' + header[5] + '", fontname="Ricty"]'
|
|
21 end
|
|
22 if header[5] == "PUT" || header[5] == "UPDATE" then
|
|
23 puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]'
|
42
|
24 puts '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]'
|
40
|
25 print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"'
|
|
26 print " -> "
|
|
27 print '"' + header[3] + "." + data[1] + '"'
|
|
28 puts ' [label="' + header[5] + '", fontname="Ricty"]'
|
|
29 end
|
|
30 end
|
|
31 }
|
|
32 puts "}"
|