2006-01-13 19:57:25 +03:00
|
|
|
#!/usr/bin/perl -w
|
1999-07-23 22:39:31 +04:00
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
1999-11-02 02:33:56 +03:00
|
|
|
# The contents of this file are subject to the Netscape Public
|
|
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at http://www.mozilla.org/NPL/
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
1999-11-02 02:33:56 +03:00
|
|
|
# Software distributed under the License is distributed on an "AS
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
# implied. See the License for the specific language governing
|
|
|
|
# rights and limitations under the License.
|
1998-06-17 01:43:24 +04:00
|
|
|
#
|
|
|
|
# The Original Code is the Bonsai CVS tool.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
1999-11-02 02:33:56 +03:00
|
|
|
# Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-10-19 02:55:01 +04:00
|
|
|
use strict;
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
require 'CGI.pl';
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
use vars qw($CloseTimeStamp);
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "Content-type: text/html\n\n";
|
|
|
|
LoadCheckins();
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
my $maxsize = 400;
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
PutsHeader("Beancounter central", "Meaningless checkin statistics");
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "
|
1998-06-17 01:43:24 +04:00
|
|
|
<TABLE BORDER CELLSPACING=2><TR>
|
|
|
|
<TH>Tree closed</TH>
|
|
|
|
<TH>Number<BR>of<BR>people<BR>making<BR>changes</TH>
|
|
|
|
<TH COLSPAN=2>Number of checkins</TH>
|
1999-07-23 22:39:31 +04:00
|
|
|
</TR>\n";
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
my @list = ();
|
|
|
|
my $globstr = DataDir() . '/batch-*[0-9].pl';
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
foreach my $i (glob($globstr )) {
|
|
|
|
if ($i =~ /(\d+)/) {
|
|
|
|
push @list, $1;
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
@list = sort { $b <=> $a } @list;
|
|
|
|
my $first = 1;
|
|
|
|
my $biggest = 1;
|
|
|
|
my %minfo; # meaninglesss info
|
|
|
|
|
|
|
|
foreach my $i (@list) {
|
|
|
|
my $batch = DataDir() . "/batch-$i.pl";
|
|
|
|
require $batch;
|
|
|
|
|
|
|
|
$minfo{$i}{num} = scalar @::CheckInList;
|
|
|
|
$biggest = $minfo{$i}{num} if ($minfo{$i}{num} > $biggest);
|
|
|
|
if ($first) {
|
|
|
|
$minfo{$i}{donetime} = "Current hook";
|
|
|
|
$first = 0;
|
|
|
|
} else {
|
|
|
|
$minfo{$i}{donetime} = MyFmtClock($::CloseTimeStamp);
|
|
|
|
}
|
|
|
|
|
|
|
|
my %people = ();
|
|
|
|
foreach my $checkin (@::CheckInList) {
|
|
|
|
my $info = eval("\\\%$checkin");
|
|
|
|
$people{$$info{'person'}} = 1;
|
|
|
|
}
|
|
|
|
$minfo{$i}{numpeople} = scalar keys(%people);
|
1998-06-17 01:43:24 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
foreach my $i (@list) {
|
|
|
|
print "<tr>\n";
|
|
|
|
print "<TD>$minfo{$i}{donetime}</TD>\n";
|
|
|
|
print "<TD ALIGN=RIGHT>$minfo{$i}{numpeople}</TD>\n";
|
|
|
|
print "<TD ALIGN=RIGHT>$minfo{$i}{num}</TD>\n";
|
|
|
|
printf "<TD><table WIDTH=%d bgcolor=green>\n",
|
|
|
|
($minfo{$i}{num} * $maxsize) / $biggest;
|
|
|
|
print "<tr><td> </td></tr></table></TD>\n";
|
|
|
|
print "</TR>\n";
|
|
|
|
}
|
1998-06-17 01:43:24 +04:00
|
|
|
|
1999-07-23 22:39:31 +04:00
|
|
|
print "</table>\n";
|
|
|
|
PutsTrailer();
|
|
|
|
exit;
|