Skip to content

Commit

Permalink
Start separate area for charting tools. This is intended for tools th…
Browse files Browse the repository at this point in the history
…at are not part of the normal metadata build process, which for now at least will remain in the build directory.
  • Loading branch information
iay committed Nov 19, 2009
1 parent 3030961 commit 4610721
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
25 changes: 25 additions & 0 deletions charting/fetch.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/perl -w

#
# fetch.pl
#
use File::stat;

$fn = '../xml/ukfederation-metadata.xml';

@months = (
'2006-12',
'2007-01', '2007-02', '2007-03', '2007-04', '2007-05', '2007-06',
'2007-07', '2007-08', '2007-09', '2007-10', '2007-11', '2007-12',
'2008-01', '2008-02', '2008-03', '2008-04', '2008-05', '2008-06',
'2008-07', '2008-08', '2008-09', '2008-10', '2008-11', '2008-12',
'2009-01', '2009-02', '2009-03', '2009-04', '2009-05', '2009-06',
'2009-07', '2009-08', '2009-09', '2009-10', '2009-11',
);

foreach $month (@months) {
print "Fetching $month...";
system("svn update $fn --quiet --revision \\{$month-01T00:00:00Z\\}");
system("cp $fn cache/$month.xml");
print "\n";
}
29 changes: 29 additions & 0 deletions charting/sizes.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/perl -w

#
# sizes.pl
#
use File::stat;

$fn = '../xml/ukfederation-metadata.xml';

@months = (
'2006-12',
'2007-01', '2007-02', '2007-03', '2007-04', '2007-05', '2007-06',
'2007-07', '2007-08', '2007-09', '2007-10', '2007-11', '2007-12',
'2008-01', '2008-02', '2008-03', '2008-04', '2008-05', '2008-06',
'2008-07', '2008-08', '2008-09', '2008-10', '2008-11', '2008-12',
'2009-01', '2009-02', '2009-03', '2009-04', '2009-05', '2009-06',
'2009-07', '2009-08', '2009-09', '2009-10', '2009-11',
);

print "month size entities ratio\n";

foreach $month (@months) {
system("svn update $fn --quiet --revision \\{$month-01T00:00:00Z\\}");
$stat = stat('../xml/ukfederation-metadata.xml');
$size = $stat->size;
$wc = int(`grep '</Entity' $fn | wc -l`);
$ratio = int($size/$wc);
print "$month $size $wc $ratio\n";
}

0 comments on commit 4610721

Please sign in to comment.