summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/lhash/lh_stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/lhash/lh_stats.c')
-rw-r--r--src/lib/libcrypto/lhash/lh_stats.c49
1 files changed, 17 insertions, 32 deletions
diff --git a/src/lib/libcrypto/lhash/lh_stats.c b/src/lib/libcrypto/lhash/lh_stats.c
index 23fe82f777..39ea2885f4 100644
--- a/src/lib/libcrypto/lhash/lh_stats.c
+++ b/src/lib/libcrypto/lhash/lh_stats.c
@@ -63,13 +63,14 @@
63 * and things should work as expected */ 63 * and things should work as expected */
64#include "cryptlib.h" 64#include "cryptlib.h"
65 65
66#include "lhash.h" 66#ifndef OPENSSL_NO_BIO
67#include <openssl/bio.h>
68#endif
69#include <openssl/lhash.h>
67 70
68#ifndef HEADER_BIO_H 71#ifdef OPENSSL_NO_BIO
69 72
70void lh_stats(lh, out) 73void lh_stats(LHASH *lh, FILE *out)
71LHASH *lh;
72FILE *out;
73 { 74 {
74 fprintf(out,"num_items = %lu\n",lh->num_items); 75 fprintf(out,"num_items = %lu\n",lh->num_items);
75 fprintf(out,"num_nodes = %u\n",lh->num_nodes); 76 fprintf(out,"num_nodes = %u\n",lh->num_nodes);
@@ -87,7 +88,7 @@ FILE *out;
87 fprintf(out,"num_retrieve = %lu\n",lh->num_retrieve); 88 fprintf(out,"num_retrieve = %lu\n",lh->num_retrieve);
88 fprintf(out,"num_retrieve_miss = %lu\n",lh->num_retrieve_miss); 89 fprintf(out,"num_retrieve_miss = %lu\n",lh->num_retrieve_miss);
89 fprintf(out,"num_hash_comps = %lu\n",lh->num_hash_comps); 90 fprintf(out,"num_hash_comps = %lu\n",lh->num_hash_comps);
90#ifdef DEBUG 91#if 0
91 fprintf(out,"p = %u\n",lh->p); 92 fprintf(out,"p = %u\n",lh->p);
92 fprintf(out,"pmax = %u\n",lh->pmax); 93 fprintf(out,"pmax = %u\n",lh->pmax);
93 fprintf(out,"up_load = %lu\n",lh->up_load); 94 fprintf(out,"up_load = %lu\n",lh->up_load);
@@ -95,9 +96,7 @@ FILE *out;
95#endif 96#endif
96 } 97 }
97 98
98void lh_node_stats(lh, out) 99void lh_node_stats(LHASH *lh, FILE *out)
99LHASH *lh;
100FILE *out;
101 { 100 {
102 LHASH_NODE *n; 101 LHASH_NODE *n;
103 unsigned int i,num; 102 unsigned int i,num;
@@ -110,9 +109,7 @@ FILE *out;
110 } 109 }
111 } 110 }
112 111
113void lh_node_usage_stats(lh, out) 112void lh_node_usage_stats(LHASH *lh, FILE *out)
114LHASH *lh;
115FILE *out;
116 { 113 {
117 LHASH_NODE *n; 114 LHASH_NODE *n;
118 unsigned long num; 115 unsigned long num;
@@ -141,10 +138,8 @@ FILE *out;
141 138
142#else 139#else
143 140
144#ifndef NO_FP_API 141#ifndef OPENSSL_NO_FP_API
145void lh_stats(lh,fp) 142void lh_stats(const LHASH *lh, FILE *fp)
146LHASH *lh;
147FILE *fp;
148 { 143 {
149 BIO *bp; 144 BIO *bp;
150 145
@@ -156,9 +151,7 @@ FILE *fp;
156end:; 151end:;
157 } 152 }
158 153
159void lh_node_stats(lh,fp) 154void lh_node_stats(const LHASH *lh, FILE *fp)
160LHASH *lh;
161FILE *fp;
162 { 155 {
163 BIO *bp; 156 BIO *bp;
164 157
@@ -170,9 +163,7 @@ FILE *fp;
170end:; 163end:;
171 } 164 }
172 165
173void lh_node_usage_stats(lh,fp) 166void lh_node_usage_stats(const LHASH *lh, FILE *fp)
174LHASH *lh;
175FILE *fp;
176 { 167 {
177 BIO *bp; 168 BIO *bp;
178 169
@@ -186,9 +177,7 @@ end:;
186 177
187#endif 178#endif
188 179
189void lh_stats_bio(lh, out) 180void lh_stats_bio(const LHASH *lh, BIO *out)
190LHASH *lh;
191BIO *out;
192 { 181 {
193 char buf[128]; 182 char buf[128];
194 183
@@ -224,7 +213,7 @@ BIO *out;
224 BIO_puts(out,buf); 213 BIO_puts(out,buf);
225 sprintf(buf,"num_hash_comps = %lu\n",lh->num_hash_comps); 214 sprintf(buf,"num_hash_comps = %lu\n",lh->num_hash_comps);
226 BIO_puts(out,buf); 215 BIO_puts(out,buf);
227#ifdef DEBUG 216#if 0
228 sprintf(buf,"p = %u\n",lh->p); 217 sprintf(buf,"p = %u\n",lh->p);
229 BIO_puts(out,buf); 218 BIO_puts(out,buf);
230 sprintf(buf,"pmax = %u\n",lh->pmax); 219 sprintf(buf,"pmax = %u\n",lh->pmax);
@@ -236,9 +225,7 @@ BIO *out;
236#endif 225#endif
237 } 226 }
238 227
239void lh_node_stats_bio(lh, out) 228void lh_node_stats_bio(const LHASH *lh, BIO *out)
240LHASH *lh;
241BIO *out;
242 { 229 {
243 LHASH_NODE *n; 230 LHASH_NODE *n;
244 unsigned int i,num; 231 unsigned int i,num;
@@ -253,9 +240,7 @@ BIO *out;
253 } 240 }
254 } 241 }
255 242
256void lh_node_usage_stats_bio(lh, out) 243void lh_node_usage_stats_bio(const LHASH *lh, BIO *out)
257LHASH *lh;
258BIO *out;
259 { 244 {
260 LHASH_NODE *n; 245 LHASH_NODE *n;
261 unsigned long num; 246 unsigned long num;