OPENSSL_LH_STATS(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… OPENSSL_LH_STATS β€” LHASH statistics (yes bestie, it's the 3ossl one)

okay so this is the OPENSSL_LH_STATS(3ossl) page, and before you ask β€” yes, the whole fam is deprecated, and yes, we're still gonna learn it because ✨knowledge✨. it's giving "archival queen". let's go πŸŽ€

🌸 NAME 🌸

OPENSSL_LH_stats, OPENSSL_LH_node_stats, OPENSSL_LH_node_usage_stats, OPENSSL_LH_stats_bio, OPENSSL_LH_node_stats_bio, OPENSSL_LH_node_usage_stats_bio β€” all the LHASH statistics functions, together, in one place 🫢


✨ SYNOPSIS ✨

first, the include, no cap:

#include <openssl/lhash.h>

okay and here's the big mood: the following functions have been deprecated since OpenSSL 3.1, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β€” see openssl_user_macros(7) for the deets πŸ’…

void OPENSSL_LH_node_stats(LHASH *table, FILE *out);
void OPENSSL_LH_node_usage_stats(LHASH *table, FILE *out);
void OPENSSL_LH_node_stats_bio(LHASH *table, BIO *out);
void OPENSSL_LH_node_usage_stats_bio(LHASH *table, BIO *out);
void OPENSSL_LH_stats(LHASH *table, FILE *out);
void OPENSSL_LH_stats_bio(LHASH *table, BIO *out);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the LHASH structure records statistics about, like, most aspects of accessing the hash table. main character data structure behavior, honestly πŸ‘‘

  • OPENSSL_LH_stats() β€” prints out statistics on the size of the hash table and how many entries are in it. BUT. for historical reasons (iykyk 😭), this function also outputs a number of additional statistics β€” except the tracking of those statistics is no longer supported, so they're always reported as zero. literally always zero. don't come for me, that's just what it says πŸ’€
  • OPENSSL_LH_node_stats() β€” prints the number of entries for each 'bucket' in the hash table. one line per bucket vibes πŸͺ£
  • OPENSSL_LH_node_usage_stats() β€” prints out a short summary of the state of the hash table. it prints the 'load' and the 'actual load'. okay so:
    • the 'load' is the average number of data items per 'bucket' in the hash table.
    • the 'actual load' is the average number of items per 'bucket', but only for buckets which contain entries.
    • so the 'actual load' is the average number of searches that will need to find an item in the hash table, while the 'load' is the average number that will be done to record a miss. two different averages, two different moments, both iconic 🌈
  • OPENSSL_LH_stats_bio(), OPENSSL_LH_node_stats_bio() and OPENSSL_LH_node_usage_stats_bio() β€” same as the above, except that the output goes to a BIO instead of a FILE. that's it. that's the whole difference. slay πŸ’–
these functions are deprecated and should no longer be used. i'm not saying it, the manpage is saying it. and honestly? bestie, listen to the manpage πŸ™ˆ

⭐ RETURN VALUES ⭐

these functions do not return values. nothing. void. silence. the absence of a return is itself the vibe 🧚

πŸ”₯ NOTE πŸ”₯

these calls should be made under a read lock. refer to "NOTE" in OPENSSL_LH_COMPFUNC(3) for more details about the locks required when using the LHASH data structure. lock first, then look. periodt πŸ”

πŸ’œ SEE ALSO πŸ’œ

🌸 HISTORY 🌸

these functions were deprecated in version 3.1. farewell sweet princes πŸ’€πŸ«Ά

Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the page!! πŸŽ€ this cutie was brought to you by OpenSSL version 3.5.0, dated 2026-09-25, and the header tag OPENSSL_LH_STATS(3ossl) β€” mwah, go touch some hash tables bestie πŸ’…βœ¨

πŸ“¦ where this page comes from