xref: /freebsd/crypto/openssl/doc/man3/OPENSSL_LH_stats.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimOPENSSL_LH_stats, OPENSSL_LH_node_stats, OPENSSL_LH_node_usage_stats,
6e71b7053SJung-uk KimOPENSSL_LH_stats_bio,
7e71b7053SJung-uk KimOPENSSL_LH_node_stats_bio, OPENSSL_LH_node_usage_stats_bio - LHASH statistics
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim=head1 SYNOPSIS
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim #include <openssl/lhash.h>
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim void OPENSSL_LH_stats(LHASH *table, FILE *out);
14e71b7053SJung-uk Kim void OPENSSL_LH_node_stats(LHASH *table, FILE *out);
15e71b7053SJung-uk Kim void OPENSSL_LH_node_usage_stats(LHASH *table, FILE *out);
16e71b7053SJung-uk Kim
17e71b7053SJung-uk Kim void OPENSSL_LH_stats_bio(LHASH *table, BIO *out);
18e71b7053SJung-uk Kim void OPENSSL_LH_node_stats_bio(LHASH *table, BIO *out);
19e71b7053SJung-uk Kim void OPENSSL_LH_node_usage_stats_bio(LHASH *table, BIO *out);
20e71b7053SJung-uk Kim
21e71b7053SJung-uk Kim=head1 DESCRIPTION
22e71b7053SJung-uk Kim
23e71b7053SJung-uk KimThe B<LHASH> structure records statistics about most aspects of
24e71b7053SJung-uk Kimaccessing the hash table.
25e71b7053SJung-uk Kim
26*b077aed3SPierre ProncheryOPENSSL_LH_stats() prints out statistics on the size of the hash table and how
27*b077aed3SPierre Proncherymany entries are in it. For historical reasons, this function also outputs a
28*b077aed3SPierre Proncherynumber of additional statistics, but the tracking of these statistics is no
29*b077aed3SPierre Proncherylonger supported and these statistics are always reported as zero.
30e71b7053SJung-uk Kim
31e71b7053SJung-uk KimOPENSSL_LH_node_stats() prints the number of entries for each 'bucket' in the
32e71b7053SJung-uk Kimhash table.
33e71b7053SJung-uk Kim
34e71b7053SJung-uk KimOPENSSL_LH_node_usage_stats() prints out a short summary of the state of the
35e71b7053SJung-uk Kimhash table.  It prints the 'load' and the 'actual load'.  The load is
36e71b7053SJung-uk Kimthe average number of data items per 'bucket' in the hash table.  The
37e71b7053SJung-uk Kim'actual load' is the average number of items per 'bucket', but only
38e71b7053SJung-uk Kimfor buckets which contain entries.  So the 'actual load' is the
39e71b7053SJung-uk Kimaverage number of searches that will need to find an item in the hash
40e71b7053SJung-uk Kimtable, while the 'load' is the average number that will be done to
41e71b7053SJung-uk Kimrecord a miss.
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimOPENSSL_LH_stats_bio(), OPENSSL_LH_node_stats_bio() and OPENSSL_LH_node_usage_stats_bio()
44e71b7053SJung-uk Kimare the same as the above, except that the output goes to a B<BIO>.
45e71b7053SJung-uk Kim
46e71b7053SJung-uk Kim=head1 RETURN VALUES
47e71b7053SJung-uk Kim
48e71b7053SJung-uk KimThese functions do not return values.
49e71b7053SJung-uk Kim
50e71b7053SJung-uk Kim=head1 NOTE
51e71b7053SJung-uk Kim
52e71b7053SJung-uk KimThese calls should be made under a read lock. Refer to
53e71b7053SJung-uk KimL<OPENSSL_LH_COMPFUNC(3)/NOTE> for more details about the locks required
54e71b7053SJung-uk Kimwhen using the LHASH data structure.
55e71b7053SJung-uk Kim
56e71b7053SJung-uk Kim=head1 SEE ALSO
57e71b7053SJung-uk Kim
58e71b7053SJung-uk KimL<bio(7)>, L<OPENSSL_LH_COMPFUNC(3)>
59e71b7053SJung-uk Kim
60e71b7053SJung-uk Kim=head1 COPYRIGHT
61e71b7053SJung-uk Kim
62*b077aed3SPierre ProncheryCopyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
63e71b7053SJung-uk Kim
64*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
65e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
66e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
67e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
68e71b7053SJung-uk Kim
69e71b7053SJung-uk Kim=cut
70