svn commit: samba r9095 - branches/SAMBA_3_0/source/tdb trunk/source/tdb

vlendec at samba.org vlendec at samba.org
Fri Aug 5 04:32:25 GMT 2005


Author: vlendec
Date: 2005-08-05 04:32:24 +0000 (Fri, 05 Aug 2005)
New Revision: 9095

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9095

Log:
Add crude chainlength statistics to the crude tdbtool.

Volker

Modified:
   branches/SAMBA_3_0/source/tdb/tdb.c
   trunk/source/tdb/tdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/tdb/tdb.c
===================================================================
--- branches/SAMBA_3_0/source/tdb/tdb.c	2005-08-05 01:57:45 UTC (rev 9094)
+++ branches/SAMBA_3_0/source/tdb/tdb.c	2005-08-05 04:32:24 UTC (rev 9095)
@@ -560,6 +560,7 @@
 static int tdb_dump_chain(TDB_CONTEXT *tdb, int i)
 {
 	tdb_off rec_ptr, top;
+	int hash_length = 0;
 
 	top = TDB_HASH_TOP(i);
 
@@ -574,8 +575,11 @@
 
 	while (rec_ptr) {
 		rec_ptr = tdb_dump_record(tdb, rec_ptr);
+		hash_length += 1;
 	}
 
+	printf("chain %d length %d\n", i, hash_length);
+
 	return tdb_unlock(tdb, i, F_WRLCK);
 }
 

Modified: trunk/source/tdb/tdb.c
===================================================================
--- trunk/source/tdb/tdb.c	2005-08-05 01:57:45 UTC (rev 9094)
+++ trunk/source/tdb/tdb.c	2005-08-05 04:32:24 UTC (rev 9095)
@@ -560,6 +560,7 @@
 static int tdb_dump_chain(TDB_CONTEXT *tdb, int i)
 {
 	tdb_off rec_ptr, top;
+	int hash_length = 0;
 
 	top = TDB_HASH_TOP(i);
 
@@ -574,8 +575,11 @@
 
 	while (rec_ptr) {
 		rec_ptr = tdb_dump_record(tdb, rec_ptr);
+		hash_length += 1;
 	}
 
+	printf("chain %d length %d\n", i, hash_length);
+
 	return tdb_unlock(tdb, i, F_WRLCK);
 }
 



More information about the samba-cvs mailing list