Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 1755 Bytes
- Properties:
- Property svn:executable is set to *
1 | #!/usr/bin/ruby |
2 | |
3 | latest=[] |
4 | |
5 | class CallNode |
6 | attr_accessor :name, :time, :children, :queries, :query_time |
7 | |
8 | def initialize(name) |
9 | @name = name |
10 | @children = Array.new |
11 | @queries = 0 |
12 | @query_time = 0 |
13 | @time = 0 |
14 | end |
15 | |
16 | def to_s |
17 | name |
18 | end |
19 | |
20 | def print_tree(depth) |
21 | child_time=children.inject(0) {|total,c| c.time.to_f + total} || 0 |
22 | printf "%s %-40s %f q=%-3d (%f) o=%f\n", |
23 | " "*depth, |
24 | name, |
25 | time, |
26 | queries, |
27 | query_time, |
28 | time-child_time-query_time |
29 | |
30 | #" " "*depth+"** #{name} #{time} #{time-child_time} #{queries} queries (#{query_time})" |
31 | children.each do |child| |
32 | child.print_tree(depth+1) |
33 | end |
34 | end |
35 | |
36 | def averages(average_hash = Hash.new) |
37 | average_hash[name] ||= Array.new |
38 | average_hash[name].push time |
39 | children.each { |child| child.averages(average_hash) } |
40 | average_hash |
41 | end |
42 | end |
43 | |
44 | def putsi(depth,string) |
45 | puts " "*depth + string |
46 | end |
47 | |
48 | root=CallNode.new('ROOT') |
49 | latest=[root] |
50 | |
51 | ARGF.each_line do |line| |
52 | case line |
53 | when /^Processing ([a-zA-Z0-9_]+#[a-z_]+)/ |
54 | # putsi latest.size, "Starting #{$1}" |
55 | node = CallNode.new($1) |
56 | latest.last.children << node |
57 | latest.push node |
58 | when /^End of component rendering/ |
59 | nil |
60 | when /\(([0-9.]+)\).*SELECT/ |
61 | latest.last.queries += 1 |
62 | latest.last.query_time += $1.to_f |
63 | when /^Completed in ([0-9.]+)/ |
64 | latest.last.time=$1.to_f |
65 | latest.pop |
66 | when /^BENCHMARK: (.*) \((.*)\)/ |
67 | node = CallNode.new($1) |
68 | node.time = $2.to_f |
69 | latest.last.children << node |
70 | end |
71 | end |
72 | |
73 | root.print_tree(0) |
74 | puts "\nAverages:" |
75 | averages = root.averages |
76 | |
77 | averages.keys.sort.each do |name| |
78 | printf " %-40s %8f\n",name,(averages[name].inject(0) {|sum,time| sum+time})/averages[name].size |
79 | end |