MXS-1918 Remove HASHTABLE from dcb.cc
This commit is contained in:
parent
ee03ffd7db
commit
8f9bf100e1
@ -245,7 +245,6 @@ void dListDCBs(DCB *); /* List all DCBs in the system */
|
||||
void dListClients(DCB *); /* List al the client DCBs */
|
||||
const char *gw_dcb_state2string(dcb_state_t); /* DCB state to string */
|
||||
void dcb_printf(DCB *, const char *, ...) __attribute__((format(printf, 2, 3))); /* DCB version of printf */
|
||||
void dcb_hashtable_stats(DCB *, void *); /**< Print statisitics */
|
||||
int dcb_add_callback(DCB *, DCB_REASON, int (*)(struct dcb *, DCB_REASON, void *), void *);
|
||||
int dcb_remove_callback(DCB *, DCB_REASON, int (*)(struct dcb *, DCB_REASON, void *), void *);
|
||||
int dcb_count_by_usage(DCB_USAGE); /* Return counts of DCBs */
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/hashtable.h>
|
||||
#include <maxscale/clock.h>
|
||||
#include <maxscale/limits.h>
|
||||
#include <maxscale/listener.h>
|
||||
@ -1740,37 +1739,6 @@ dcb_printf(DCB *dcb, const char *fmt, ...)
|
||||
dcb->func.write(dcb, buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print hash table statistics to a DCB
|
||||
*
|
||||
* @param dcb The DCB to send the information to
|
||||
* @param table The hash table
|
||||
*/
|
||||
void dcb_hashtable_stats(
|
||||
DCB *dcb,
|
||||
void *table)
|
||||
{
|
||||
int total;
|
||||
int longest;
|
||||
int hashsize;
|
||||
|
||||
total = 0;
|
||||
longest = 0;
|
||||
|
||||
hashtable_get_stats(table, &hashsize, &total, &longest);
|
||||
|
||||
dcb_printf(dcb,
|
||||
"Hashtable: %p, size %d\n",
|
||||
table,
|
||||
hashsize);
|
||||
|
||||
dcb_printf(dcb, "\tNo. of entries: %d\n", total);
|
||||
dcb_printf(dcb,
|
||||
"\tAverage chain length: %.1f\n",
|
||||
(hashsize == 0 ? (float)hashsize : (float)total / hashsize));
|
||||
dcb_printf(dcb, "\tLongest chain length: %d\n", longest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write data to a DCB socket through an SSL structure. The SSL structure is
|
||||
* linked from the DCB. All communication is encrypted and done via the SSL
|
||||
|
Loading…
x
Reference in New Issue
Block a user