From: Tim Bunce Date: Tue, 25 Sep 2012 14:39:36 +0000 (+0900) Subject: Tweak node naming (remove + ) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e74c1998fe85cebba28757aed23e77f3b444b518;p=p5sagit%2FDevel-Size.git Tweak node naming (remove + ) --- diff --git a/static/MemView.pl b/static/MemView.pl index 4387662..c5eaaf9 100755 --- a/static/MemView.pl +++ b/static/MemView.pl @@ -70,6 +70,7 @@ sub _fetch_node_tree { $node->{$_} += 0 for (qw(child_count kids_node_count kids_size self_size)); $node->{leaves} = $j->decode(delete $node->{leaves_json}); $node->{attr} = $j->decode(delete $node->{attr_json}); + $node->{name} .= " ->" if $node->{type} == 2 && $node->{name}; if ($node->{child_ids}) { my @child_ids = split /,/, $node->{child_ids}; @@ -80,11 +81,11 @@ sub _fetch_node_tree { # XXX id, depth, parent_id warn "Merged $node->{name} #$node->{id} with only child $child->{name} #$child->{id}\n" if $opt_debug; - $child->{name} = "$node->{name} + $child->{name}"; + $child->{name} = "$node->{name} $child->{name}"; $child->{$_} += $node->{$_} for (qw(self_size)); $child->{$_} = $node->{$_} for (qw(parent_id)); - $child->{title} = join " + ", grep { defined && length } $child->{title}, $node->{title}; + $child->{title} = join " ", grep { defined && length } $child->{title}, $node->{title}; #warn "Titled $child->{title}" if $child->{title}; for my $attr_type (keys %{ $node->{attr} }) {