summaryrefslogtreecommitdiffstats
path: root/sbin/md5
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>1999-05-01 14:54:21 +0000
committerkris <kris@FreeBSD.org>1999-05-01 14:54:21 +0000
commit2035287c277916c1f3f849b47295e9ae53b4b6af (patch)
treef1d5743e5846c53fb0db6009262ce43fcd2b368a /sbin/md5
parent2b59f38e389fc2af682f70a7382658bf5d27abe0 (diff)
downloadFreeBSD-src-2035287c277916c1f3f849b47295e9ae53b4b6af.zip
FreeBSD-src-2035287c277916c1f3f849b47295e9ae53b4b6af.tar.gz
Fixes for -t option:
* Don't buffer "Digesting..." output - flush it immediately. * Increase the number of repetitions by a factor of 100, and the block size by a factor of 10 so as to give meaningful results on modern machines (108 seconds on my P120, and ~26 seconds on a P-II 350). PR: bin/10604 Submitted by: Stanislav Shalunov <shalunov@lynxhub.lz.att.com>
Diffstat (limited to 'sbin/md5')
-rw-r--r--sbin/md5/md5.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
index 5990894..57776b4 100644
--- a/sbin/md5/md5.c
+++ b/sbin/md5/md5.c
@@ -19,7 +19,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: md5.c,v 1.13 1998/07/06 07:04:50 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -34,8 +34,8 @@ static const char rcsid[] =
/*
* Length of test block, number of test blocks.
*/
-#define TEST_BLOCK_LEN 1000
-#define TEST_BLOCK_COUNT 1000
+#define TEST_BLOCK_LEN 10000
+#define TEST_BLOCK_COUNT 100000
static void MDString PROTO_LIST((char *));
static void MDTimeTrial PROTO_LIST((void));
@@ -120,6 +120,7 @@ MDTimeTrial()
printf
("MD5 time trial. Digesting %d %d-byte blocks ...",
TEST_BLOCK_COUNT, TEST_BLOCK_LEN);
+ fflush(stdout);
/* Initialize block */
for (i = 0; i < TEST_BLOCK_LEN; i++)
OpenPOWER on IntegriCloud