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>
This commit is contained in:
kris 1999-05-01 14:54:21 +00:00
parent c93a21b54a
commit 04a3df2c67

View File

@ -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++)