aboutsummaryrefslogtreecommitdiff
path: root/sbin/md5
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>1999-05-01 14:54:21 +0000
committerKris Kennaway <kris@FreeBSD.org>1999-05-01 14:54:21 +0000
commit93606d6ebb923ea9f80c830b3081933a5c97abd6 (patch)
tree0cd50d8eb9e747dbf3ceace8f102ee2136088180 /sbin/md5
parent9deb189ddc050fe8ac0313121480a82ece4896f1 (diff)
downloadsrc-93606d6ebb923ea9f80c830b3081933a5c97abd6.tar.gz
src-93606d6ebb923ea9f80c830b3081933a5c97abd6.zip
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>
Notes
Notes: svn path=/head/; revision=46226
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 599089408c65..57776b453487 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++)