[Evolvis-commits] r267: Added a count by user↵

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


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

Modified:
   trunk/gforge_base/evolvisforge/
   trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl
Log:
Added a count by user



Property changes on: trunk/gforge_base/evolvisforge
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2001-09-01 14:22:38.000000000 +0000
committer: cbayle

   + timestamp: 2001-09-01 14:43:14.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
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37

   + 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
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38


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:17 UTC (rev 266)
+++ trunk/gforge_base/evolvisforge/gforge/deb-specific/stats_cvs.pl	2010-02-25 13:13:20 UTC (rev 267)
@@ -30,6 +30,8 @@
 	$dbh->do( $sql );
 	$sql = "DROP TABLE deb_cvs_group";
 	$dbh->do( $sql );
+	$sql = "DROP TABLE deb_cvs_group_user";
+	$dbh->do( $sql );
 }
 
 sub create_dump_table {
@@ -102,49 +104,49 @@
 #R               Commit (the removal of a file)
 #E               Export
 	$sql = "
-	CREATE TABLE deb_cvs_group AS
-        	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
+	CREATE TABLE deb_cvs_group_user AS
+        	SELECT agg.cvsgroup,agg.cvsuser,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
+        		SELECT cvsgroup,cvsuser,year,month,day,COUNT(*) AS total
         		FROM deb_cvs_dump
-        		GROUP BY year,month,day,cvsgroup
+        		GROUP BY year,month,day,cvsgroup,cvsuser
 		) agg
 		LEFT JOIN (
-        	SELECT cvsgroup,year,month,day,COUNT(*) AS modified
+        	SELECT cvsgroup,cvsuser,year,month,day,COUNT(*) AS modified
         	FROM deb_cvs_dump
 		WHERE type='M'
-        	GROUP BY year,month,day,cvsgroup
-		) m USING (cvsgroup,year,month,day)
+        	GROUP BY year,month,day,cvsgroup,cvsuser
+		) m USING (cvsgroup,cvsuser,year,month,day)
 		LEFT JOIN (
-        	SELECT cvsgroup,year,month,day,COUNT(*) AS added
+        	SELECT cvsgroup,cvsuser,year,month,day,COUNT(*) AS added
         	FROM deb_cvs_dump
 		WHERE type='A'
-        	GROUP BY year,month,day,cvsgroup
-		) a USING (cvsgroup,year,month,day)
+        	GROUP BY year,month,day,cvsgroup,cvsuser
+		) a USING (cvsgroup,cvsuser,year,month,day)
 		LEFT JOIN (
-        	SELECT cvsgroup,year,month,day,COUNT(*) AS others
+        	SELECT cvsgroup,cvsuser,year,month,day,COUNT(*) AS others
         	FROM deb_cvs_dump
 		WHERE type!='A' and type!='M' 
-        	GROUP BY year,month,day,cvsgroup
-		) o USING (cvsgroup,year,month,day)
+        	GROUP BY year,month,day,cvsgroup,cvsuser
+		) o USING (cvsgroup,cvsuser,year,month,day)
 	";
 	$dbh->do( $sql );
 }
 
 sub print_stats {
 	my ($sql,$res,$temp);
-	$sql = "SELECT * FROM deb_cvs_group order by year, month, day";
+	$sql = "SELECT * FROM deb_cvs_group_user order by year, month, day";
 	$res = $dbh->prepare($sql);
 	$res->execute();
-	while ( my ($cvsgroup, $year, $month, $day, $total, $modified, $added, $others) = $res->fetchrow()) {
-		print "$cvsgroup $year $month $day $total=$modified+$added+$others\n";
+	while ( my ($cvsgroup, $cvsuser, $year, $month, $day, $total, $modified, $added, $others) = $res->fetchrow()) {
+		print "$cvsgroup $cvsuser $year $month $day $total=$modified+$added+$others\n";
 	}
 	print "-----------------------------------------------------\n";
-	$sql = "SELECT cvsgroup, SUM(modified), SUM(added) FROM deb_cvs_group group by cvsgroup";
+	$sql = "SELECT cvsgroup, cvsuser, SUM(modified), SUM(added) FROM deb_cvs_group_user group by cvsgroup,cvsuser";
 	$res = $dbh->prepare($sql);
 	$res->execute();
-	while ( my ($cvsgroup, $modified, $added) = $res->fetchrow()) {
-		print "$cvsgroup $modified $added\n";
+	while ( my ($cvsgroup, $cvsuser, $modified, $added) = $res->fetchrow()) {
+		print "$cvsgroup $cvsuser $modified $added\n";
 	}
 	print "-----------------------------------------------------\n";
 }




More information about the evolvis-commits mailing list