forked from Mirror/frr
lib: Reformat comment so my eyes don't fall out while reading it
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
parent
7a7761d21c
commit
c7d3895eb1
39
lib/hash.c
39
lib/hash.c
|
@ -358,33 +358,26 @@ DEFUN(show_hash_stats,
|
||||||
|
|
||||||
/* Summary statistics calculated are:
|
/* Summary statistics calculated are:
|
||||||
*
|
*
|
||||||
* - Load factor: This is the number of elements in the table divided by
|
* - Load factor: This is the number of elements in the table divided
|
||||||
* the
|
* by the number of buckets. Since this hash table implementation
|
||||||
* number of buckets. Since this hash table implementation uses
|
* uses chaining, this value can be greater than 1.
|
||||||
* chaining,
|
* This number provides information on how 'full' the table is, but
|
||||||
* this value can be greater than 1. This number provides information
|
* does not provide information on how evenly distributed the
|
||||||
* on
|
* elements are.
|
||||||
* how 'full' the table is, but does not provide information on how
|
* Notably, a load factor >= 1 does not imply that every bucket has
|
||||||
* evenly
|
* an element; with a pathological hash function, all elements could
|
||||||
* distributed the elements are. Notably, a load factor >= 1 does not
|
* be in a single bucket.
|
||||||
* imply
|
|
||||||
* that every bucket has an element; with a pathological hash
|
|
||||||
* function, all
|
|
||||||
* elements could be in a single bucket.
|
|
||||||
*
|
*
|
||||||
* - Full load factor: this is the number of elements in the table
|
* - Full load factor: this is the number of elements in the table
|
||||||
* divided by
|
* divided by the number of buckets that have some elements in them.
|
||||||
* the number of buckets that have some elements in them.
|
|
||||||
*
|
*
|
||||||
* - Std. Dev.: This is the standard deviation calculated from the
|
* - Std. Dev.: This is the standard deviation calculated from the
|
||||||
* relevant
|
* relevant load factor. If the load factor is the mean of number of
|
||||||
* load factor. If the load factor is the mean of number of elements
|
* elements per bucket, the standard deviation measures how much any
|
||||||
* per
|
* particular bucket is likely to deviate from the mean.
|
||||||
* bucket, the standard deviation measures how much any particular
|
* As a rule of thumb this number should be less than 2, and ideally
|
||||||
* bucket
|
* <= 1 for optimal performance. A number larger than 3 generally
|
||||||
* is likely to deviate from the mean. As a rule of thumb this number
|
* indicates a poor hash function.
|
||||||
* should be less than 2, and ideally <= 1 for optimal performance. A
|
|
||||||
* number larger than 3 generally indicates a poor hash function.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
double lf; // load factor
|
double lf; // load factor
|
||||||
|
|
Loading…
Reference in a new issue