[Evolvis-commits] r266: stats as waited in SF in print function↵

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 25 14:13:17 CET 2010


Author: mirabilos
Date: 2010-02-25 13:13:17 +0000 (Thu, 25 Feb 2010)
New Revision: 266

Modified:
   trunk/gforge_base/evolvisforge/
   trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl
Log:
stats as waited in SF in print function



Property changes on: trunk/gforge_base/evolvisforge
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2001-09-01 12:35:16.000000000 +0000
committer: cbayle

   + timestamp: 2001-09-01 14:22:38.000000000 +0000
committer: cbayle

Name: bzr:revision-id:v4
   - 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36

   + 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37


Modified: trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl	2010-02-25 13:13:14 UTC (rev 265)
+++ trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl	2010-02-25 13:13:17 UTC (rev 266)
@@ -5,7 +5,7 @@
 #  *
 #  * Recurses through the /cvsroot directory tree and parses each projects
 #  * '~/CVSROOT/history' file, and create and fill the sql table with 
-#  * checkouts, commits, and adds to each project.
+#  * modified, and added to each project.
 #  *
 #  * @version   $Id$
 #  *
@@ -65,9 +65,9 @@
 			## Split the cvs history entry into it's 6 fields.
 			($cvstime,$user,$curdir,$module,$rev,$file) = split(/\|/, $_, 6 );
 	
-			## log commits  $type eq "M" 
-			## log adds  $type eq "A"
-			## log checkouts  $type eq "O" 
+			## log modified  $type eq "M" 
+			## log added  $type eq "A"
+			## log others  $type neq "A"  neq "M"
 			$type = substr($cvstime, 0, 1);
 			$time_parsed = hex( substr($cvstime, 1, 8) );
 			$year	= strftime("%Y", gmtime( $time_parsed ) );
@@ -103,22 +103,22 @@
 #E               Export
 	$sql = "
 	CREATE TABLE deb_cvs_group AS
-        	SELECT agg.cvsgroup,agg.year,agg.month,agg.day,agg.total AS total,c.commits AS commits,a.adds AS adds,o.others AS others
+        	SELECT agg.cvsgroup,agg.year,agg.month,agg.day,agg.total AS total,m.modified AS modified,a.added AS added,o.others AS others
         	FROM (
         		SELECT cvsgroup,year,month,day,COUNT(*) AS total
         		FROM deb_cvs_dump
         		GROUP BY year,month,day,cvsgroup
 		) agg
 		LEFT JOIN (
-        	SELECT cvsgroup,year,month,day,COUNT(*) AS commits
+        	SELECT cvsgroup,year,month,day,COUNT(*) AS modified
         	FROM deb_cvs_dump
-		WHERE type='A'
+		WHERE type='M'
         	GROUP BY year,month,day,cvsgroup
-		) c USING (cvsgroup,year,month,day)
+		) m USING (cvsgroup,year,month,day)
 		LEFT JOIN (
-        	SELECT cvsgroup,year,month,day,COUNT(*) AS adds
+        	SELECT cvsgroup,year,month,day,COUNT(*) AS added
         	FROM deb_cvs_dump
-		WHERE type='M'
+		WHERE type='A'
         	GROUP BY year,month,day,cvsgroup
 		) a USING (cvsgroup,year,month,day)
 		LEFT JOIN (
@@ -136,9 +136,17 @@
 	$sql = "SELECT * FROM deb_cvs_group order by year, month, day";
 	$res = $dbh->prepare($sql);
 	$res->execute();
-	while ( my ($cvsgroup, $year, $month, $day, $total, $commits, $adds, $others) = $res->fetchrow()) {
-		print "$cvsgroup $year $month $day $total=$commits+$adds+$others\n";
+	while ( my ($cvsgroup, $year, $month, $day, $total, $modified, $added, $others) = $res->fetchrow()) {
+		print "$cvsgroup $year $month $day $total=$modified+$added+$others\n";
 	}
+	print "-----------------------------------------------------\n";
+	$sql = "SELECT cvsgroup, SUM(modified), SUM(added) FROM deb_cvs_group group by cvsgroup";
+	$res = $dbh->prepare($sql);
+	$res->execute();
+	while ( my ($cvsgroup, $modified, $added) = $res->fetchrow()) {
+		print "$cvsgroup $modified $added\n";
+	}
+	print "-----------------------------------------------------\n";
 }
 
 #############




More information about the evolvis-commits mailing list