Addition of hash table statisics commands

This commit is contained in:
Mark Riddoch
2013-06-25 18:20:00 +02:00
parent 33c98b54e7
commit 0792801996
10 changed files with 173 additions and 25 deletions

View File

@ -15,6 +15,7 @@
*
* Copyright SkySQL Ab 2013
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <users.h>
@ -147,3 +148,28 @@ users_update(USERS *users, char *user, char *auth)
return 0;
return hashtable_add(users->data, user, auth);
}
/**
* Print details of the users storage mechanism
*
* @param users The users table
*/
void
usersPrint(USERS *users)
{
printf("Users table data\n");
hashtable_stats(users->data);
}
/**
* Print details of the users storage mechanism to a DCB
*
* @param dcb DCB to print to
* @param users The users table
*/
void
dcb_usersPrint(DCB *dcb, USERS *users)
{
dcb_printf(dcb, "Users table data\n");
dcb_hashtable_stats(dcb, users->data);
}