annotate scripts/log.rb @ 605:b7eedaa38aeb dispose

close
author suruga
date Wed, 19 Apr 2017 19:19:50 +0900
parents 92aeb6e34683
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 log_file = ARGV[0]
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 puts "digraph test {"
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 open(log_file) { |io|
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 while line = io.gets
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 data = line.split("\t")
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 header = data[0].split(" ")
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 if header[2] != "DEBUG" then
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 next
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 end
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 if header[3] == "alice.codesegment.CodeSegmentManager" then
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 next
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 end
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 if header[5] == "TAKE" || header[5] == "PEEK" then
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]'
42
92aeb6e34683 implements close exception
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 40
diff changeset
15 print '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]'
40
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 print '"' + header[3] + "." + data[1] + '"'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 print " -> "
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 puts ' [label="' + header[5] + '", fontname="Ricty"]'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 end
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 if header[5] == "PUT" || header[5] == "UPDATE" then
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 puts '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"' + ' [shape="box", fontname="Ricty"]'
42
92aeb6e34683 implements close exception
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 40
diff changeset
24 puts '"' + header[3] + "." + data[1] + '"' + ' [fontname="Ricty"]'
40
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 print '"' + data[4].split(" ")[0].split("=")[1].split(".")[-1] + '"'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 print " -> "
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 print '"' + header[3] + "." + data[1] + '"'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 puts ' [label="' + header[5] + '", fontname="Ricty"]'
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 end
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 end
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 puts "}"