summaryrefslogtreecommitdiff
path: root/scripts/annotate.pl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-03-19 11:02:56 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-03-19 11:02:56 +0000
commit0dfe7ff61bdeceb8a266139d8908a62a57b96079 (patch)
tree498d968419301802561e9db77fc06b371bc12c65 /scripts/annotate.pl
parenta3441c4c5f89d99ec80b74c021ae735d80b6fb82 (diff)
another contiguity metric.
Diffstat (limited to 'scripts/annotate.pl')
-rwxr-xr-xscripts/annotate.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/annotate.pl b/scripts/annotate.pl
index 2ac2d6c5..8bcad142 100755
--- a/scripts/annotate.pl
+++ b/scripts/annotate.pl
@@ -102,7 +102,11 @@ sub dump_breakdown($)
my $annotated = 0;
my %frequency;
my $contiguous = 0;
+ my $contiguous_limit = 0;
my $in_start_run = 1;
+ my $in_start_limit_run = 1;
+ my $in_start_limit_max = 5;
+ my $in_start_limit = $in_start_limit_max;
for my $rev (reverse @{$revs}) {
if($rev->{note} ne "") {
my $stem = $rev->{note};
@@ -113,8 +117,14 @@ sub dump_breakdown($)
$frequency{$stem}++;
$annotated++;
$contiguous++ if ($in_start_run);
+ $contiguous_limit++ if ($in_start_limit_run);
} else {
$in_start_run = 0;
+ if ($in_start_limit > 0) {
+ $in_start_limit--;
+ } else {
+ $in_start_limit_run = 0;
+ }
}
}
@@ -122,7 +132,8 @@ sub dump_breakdown($)
for my $stem (sort { $frequency{$b} <=> $frequency{$a} } keys %frequency) {
print "$frequency{$stem}\t$stem\n";
}
- print "contiguous annotations: $contiguous\n";
+ print "contiguous annotations: $contiguous - contiguous\n";
+ print "contiguous tolerating $in_start_limit_max missing: $contiguous_limit\n";
}
sub sanity_check_revs($$)