mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 07:15:19 +00:00
lib, vtysh: rebase hashstats
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
b3db0a22b7
commit
e703a0f3af
15
lib/hash.c
15
lib/hash.c
@ -458,22 +458,21 @@ DEFUN(show_hash_stats,
|
||||
char underln[sizeof(header) + strlen(frr_protonameinst)];
|
||||
memset (underln, '-', sizeof(underln));
|
||||
underln[sizeof(underln) - 1] = '\0';
|
||||
vty_out (vty, "%s%s%s", header, frr_protonameinst, VTY_NEWLINE);
|
||||
vty_out (vty, "%s%s", underln, VTY_NEWLINE);
|
||||
vty_outln (vty, "%s%s", header, frr_protonameinst);
|
||||
vty_outln (vty, "%s", underln);
|
||||
|
||||
vty_out (vty, "# allocated: %d%s", _hashes->count, VTY_NEWLINE);
|
||||
vty_out (vty, "# named: %d%s%s", tt->nrows - 1, VTY_NEWLINE,
|
||||
VTY_NEWLINE);
|
||||
vty_outln (vty, "# allocated: %d", _hashes->count);
|
||||
vty_outln (vty, "# named: %d%s", tt->nrows - 1, VTYNL);
|
||||
|
||||
if (tt->nrows > 1)
|
||||
{
|
||||
ttable_colseps (tt, 0, RIGHT, true, '|');
|
||||
char *table = ttable_dump (tt, VTY_NEWLINE);
|
||||
vty_out (vty, "%s%s", table, VTY_NEWLINE);
|
||||
char *table = ttable_dump (tt, VTYNL);
|
||||
vty_out (vty, "%s%s", table, VTYNL);
|
||||
XFREE (MTYPE_TMP, table);
|
||||
}
|
||||
else
|
||||
vty_out (vty, "No named hash tables to display.%s", VTY_NEWLINE);
|
||||
vty_outln (vty, "No named hash tables to display.");
|
||||
|
||||
ttable_del (tt);
|
||||
|
||||
|
@ -2114,15 +2114,13 @@ DEFUN (vtysh_show_hashtable,
|
||||
unsigned long i;
|
||||
int ret = CMD_SUCCESS;
|
||||
|
||||
vty_out (vty, "%sLoad factor (LF) - average number of elements across all "
|
||||
"buckets%s", VTY_NEWLINE, VTY_NEWLINE);
|
||||
vty_out (vty, "Full load factor (FLF) - average number of elements "
|
||||
"across full buckets%s%s", VTY_NEWLINE, VTY_NEWLINE);
|
||||
fprintf (stdout, "\n");
|
||||
fprintf (stdout, "Load factor (LF) - average number of elements across all buckets\n");
|
||||
fprintf (stdout, "Full load factor (FLF) - average number of elements across full buckets\n\n");
|
||||
|
||||
vty_out (vty, "Standard deviation (SD) is calculated for both the LF and FLF%s", VTY_NEWLINE);
|
||||
vty_out (vty, "and indicates the typical deviation of bucket chain length%s", VTY_NEWLINE);
|
||||
vty_out (vty, "from the value in the corresponding load factor.%s%s",
|
||||
VTY_NEWLINE, VTY_NEWLINE);
|
||||
fprintf (stdout, "Standard deviation (SD) is calculated for both the LF and FLF\n");
|
||||
fprintf (stdout, "and indicates the typical deviation of bucket chain length\n");
|
||||
fprintf (stdout, "from the value in the corresponding load factor.\n\n");
|
||||
|
||||
for (i = 0; i < array_size(vtysh_client); i++)
|
||||
if ( vtysh_client[i].fd >= 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user