diff options
Diffstat (limited to 'src/lib/libcrypto/lhash/lh_stats.c')
-rw-r--r-- | src/lib/libcrypto/lhash/lh_stats.c | 49 |
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 | ||
70 | void lh_stats(lh, out) | 73 | void lh_stats(LHASH *lh, FILE *out) |
71 | LHASH *lh; | ||
72 | FILE *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 | ||
98 | void lh_node_stats(lh, out) | 99 | void lh_node_stats(LHASH *lh, FILE *out) |
99 | LHASH *lh; | ||
100 | FILE *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 | ||
113 | void lh_node_usage_stats(lh, out) | 112 | void lh_node_usage_stats(LHASH *lh, FILE *out) |
114 | LHASH *lh; | ||
115 | FILE *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 |
145 | void lh_stats(lh,fp) | 142 | void lh_stats(const LHASH *lh, FILE *fp) |
146 | LHASH *lh; | ||
147 | FILE *fp; | ||
148 | { | 143 | { |
149 | BIO *bp; | 144 | BIO *bp; |
150 | 145 | ||
@@ -156,9 +151,7 @@ FILE *fp; | |||
156 | end:; | 151 | end:; |
157 | } | 152 | } |
158 | 153 | ||
159 | void lh_node_stats(lh,fp) | 154 | void lh_node_stats(const LHASH *lh, FILE *fp) |
160 | LHASH *lh; | ||
161 | FILE *fp; | ||
162 | { | 155 | { |
163 | BIO *bp; | 156 | BIO *bp; |
164 | 157 | ||
@@ -170,9 +163,7 @@ FILE *fp; | |||
170 | end:; | 163 | end:; |
171 | } | 164 | } |
172 | 165 | ||
173 | void lh_node_usage_stats(lh,fp) | 166 | void lh_node_usage_stats(const LHASH *lh, FILE *fp) |
174 | LHASH *lh; | ||
175 | FILE *fp; | ||
176 | { | 167 | { |
177 | BIO *bp; | 168 | BIO *bp; |
178 | 169 | ||
@@ -186,9 +177,7 @@ end:; | |||
186 | 177 | ||
187 | #endif | 178 | #endif |
188 | 179 | ||
189 | void lh_stats_bio(lh, out) | 180 | void lh_stats_bio(const LHASH *lh, BIO *out) |
190 | LHASH *lh; | ||
191 | BIO *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 | ||
239 | void lh_node_stats_bio(lh, out) | 228 | void lh_node_stats_bio(const LHASH *lh, BIO *out) |
240 | LHASH *lh; | ||
241 | BIO *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 | ||
256 | void lh_node_usage_stats_bio(lh, out) | 243 | void lh_node_usage_stats_bio(const LHASH *lh, BIO *out) |
257 | LHASH *lh; | ||
258 | BIO *out; | ||
259 | { | 244 | { |
260 | LHASH_NODE *n; | 245 | LHASH_NODE *n; |
261 | unsigned long num; | 246 | unsigned long num; |