[docs] xmldocs - docelic modified bin/stattree
docs at icdevgroup.org
docs at icdevgroup.org
Sat Oct 9 07:41:34 EDT 2004
User: docelic
Date: 2004-10-09 11:41:34 GMT
Modified: bin stattree
Log:
- Improve statistics numbers in $hash{total}{...}
Revision Changes Path
1.23 +22 -4 xmldocs/bin/stattree
rev 1.23, prev_rev 1.22
Index: stattree
===================================================================
RCS file: /var/cvs/xmldocs/bin/stattree,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- stattree 9 Oct 2004 11:30:28 -0000 1.22
+++ stattree 9 Oct 2004 11:41:34 -0000 1.23
@@ -347,7 +347,11 @@
ctxpost => $ctx_n,
ctxs => 1,
ctxe => scalar @filedata,
- ctx => [ format_ctx(@filedata) ] };
+ ctx => [ format_ctx(@filedata) ]
+ };
+
+ $hash{total}{$fsubtype . "s"}++;
+ $hash{total}{tags}++;
$hash{specific}{$tagname} = { # Append/update, don't overwrite
%{ $hash{specific}{$tagname} || {}},
@@ -453,6 +457,8 @@
ctxe => $ptr{lnum} + $ptr{ctx_n},
ctx => [format_ctx(@{$ptr{filedata}}[$ptr{lnum}-$ptr{ctx_p}..$ptr{lnum}+$ptr{ctx_n}])]
};
+
+ $hash{total}{pragmas}++;
}
}
@@ -474,6 +480,8 @@
ctxe => $c{lnum} + $c{ctx_n},
ctx => [format_ctx(@{$c{filedata}}[$c{lnum}-$c{ctx_p}..$c{lnum}+$c{ctx_n}])]
};
+
+ $hash{total}{globvars}++;
}
}
@@ -486,6 +494,8 @@
$hash{total}{perl_functions}++;
@{ $c{gfunc} } = ( $1, $c{lnum} );
}
+
+ $hash{total}{functions}++;
}
@@ -543,8 +553,17 @@
if (! $opens) { # Read the whole thing
$multiline = 0;
- push @globconf, $directive if $context eq 'globconf';
- push @catconf, $directive if $context eq 'catconf';
+
+ # Register the directive and do some statistics
+ if ( $context eq 'globconf' ) {
+ push @globconf, $directive ;
+ $hash{total}{globconfs}++;
+ } elsif ( $context eq 'catconf' ){
+ push @catconf, $directive;
+ $hash{total}{catconfs}++;
+ }
+ $hash{total}{confs}++;
+
$directive = "";
} elsif ( $opens > 0 ) { # Directive continues
$multiline++;
@@ -578,5 +597,4 @@
}
}
}
-
More information about the docs
mailing list