mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
r9095: Add crude chainlength statistics to the crude tdbtool.
Volker
This commit is contained in:
parent
65adbd83fe
commit
5e6fef32b3
@ -560,6 +560,7 @@ static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset)
|
||||
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 @@ static int tdb_dump_chain(TDB_CONTEXT *tdb, int i)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user