lib, vtysh: rebase hashstats

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2017-06-30 16:56:10 +00:00
parent b3db0a22b7
commit e703a0f3af
No known key found for this signature in database
GPG Key ID: DAF48E0F57E0834F
2 changed files with 13 additions and 16 deletions

View File

@ -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);

View File

@ -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 ) {