Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Calculate total size of duplicated certificates.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jan 20, 2014
1 parent ab65a30 commit 7d52087
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charting/keynames_inner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ sub comment {
my $nowYearMonth = time2str('%Y-%m-01T00:00:00', time());
my $validStart = str2time($nowYearMonth);

#
# Total size of deduplicated blobs.
#
my $dedupTotal = 0;

while (<>) {

#
Expand Down Expand Up @@ -196,6 +201,7 @@ sub comment {
#
$total_certs++;
if (defined($blobs{$blob})) {
$dedupTotal += (length($blob) - length($_) - 1);
# print "skipping a blob\n";
close $fh;
next;
Expand Down Expand Up @@ -338,4 +344,6 @@ sub numerically {
print "Total: $total\n";

print "\n";

print "Deduplication saves: $dedupTotal\n";
}

0 comments on commit 7d52087

Please sign in to comment.