diff -urN ldap.temp/clients/tools/ldapmodify.c ldap/clients/tools/ldapmodify.c
--- ldap.temp/clients/tools/ldapmodify.c	Mon Sep 27 21:50:36 1999
+++ ldap/clients/tools/ldapmodify.c	Mon Sep 27 22:08:22 1999
@@ -32,6 +32,9 @@
 static char	*ldaphost = NULL;
 static int	ldapport = 0;
 static int	new, replace, not, verbose, contoper, force, valsfromfiles;
+static int	statistics, statistics_add, statistics_modify
+		, statistics_delete, statistics_modrdn, statistics_error;
+static time_t	statistics_time;
 static LDAP	*ld;
 
 #define safe_realloc( ptr, size )	( ptr == NULL ? malloc( size ) : \
@@ -65,7 +68,7 @@
 static void freepmods LDAP_P(( LDAPMod **pmods ));
 static int fromfile LDAP_P(( char *path, struct berval *bv ));
 static char *read_one_record LDAP_P(( FILE *fp ));
-
+static void dostatistics(int final);
 
 int
 main( int argc, char **argv )
@@ -73,7 +76,7 @@
     char		*infile, *rbuf, *start, *p, *q;
     FILE		*fp;
     int			rc, i, use_ldif, authmethod, want_bindpw, debug;
-    char		*usage = "usage: %s [-abcknrvWF] [-d debug-level] [-h ldaphost] [-p ldapport] [-D binddn] [-w passwd] [ -f file | < entryfile ]\n";
+    char		*usage = "usage: %s [-abcknrvsWF] [-d debug-level] [-h ldaphost] [-p ldapport] [-D binddn] [-w passwd] [ -f file | < entryfile ]\n";
 
     if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) {
 	prog = argv[ 0 ];
@@ -84,9 +87,13 @@
 
     infile = NULL;
     not = verbose = valsfromfiles = want_bindpw = debug = 0;
+    statistics = statistics_add = statistics_modify = statistics_delete
+      = statistics_modrdn = statistics_error = 0;
+    statistics_time = time(NULL);
+
     authmethod = LDAP_AUTH_SIMPLE;
 
-    while (( i = getopt( argc, argv, "WFabckKnrtvh:p:D:w:d:f:" )) != EOF ) {
+    while (( i = getopt( argc, argv, "WFabckKnrstvh:p:D:w:d:f:" )) != EOF ) {
 	switch( i ) {
 	case 'a':	/* add */
 	    new = 1;
@@ -146,6 +153,9 @@
 	case 'v':	/* verbose mode */
 	    verbose++;
 	    break;
+	case 's':       /* statistics output */
+	    statistics = 1;
+	    break;
 	case 'W':
 		want_bindpw++;
 		break;
@@ -155,6 +165,13 @@
 	}
     }
 
+    if(not && statistics)
+	statistics = 0;
+    if(statistics && verbose)
+	verbose = 0;
+    if(statistics)
+	printf("Time, Add, Modify, Delete, Modrdn, Error\n");
+
     if ( argc - optind != 0 ) {
 	fprintf( stderr, usage, prog );
 	exit( 1 );
@@ -234,12 +251,31 @@
 	ldap_unbind( ld );
     }
 
+    dostatistics(1);
     exit( rc );
 
 	/* UNREACHABLE */
 	return(0);
 }
 
+static void
+dostatistics(int final)
+{
+    time_t time_diff;
+
+    if(!statistics)
+	return;
+    time_diff = time(NULL) - statistics_time;
+    if(time_diff > 59 || final)
+    {
+	printf("%d, %d, %d, %d, %d, %d\n", (int)time_diff, statistics_add
+	     , statistics_modify, statistics_delete, statistics_modrdn
+	     , statistics_error);
+	statistics_time += time_diff;
+	statistics_add = statistics_modify = statistics_delete
+	  = statistics_modrdn = statistics_error = 0;
+    }
+}
 
 static int
 process_ldif_rec( char *rbuf )
@@ -406,6 +442,7 @@
     if ( pmods != NULL ) {
 	freepmods( pmods );
     }
+    dostatistics(0);
 
     return( rc );
 }
@@ -636,10 +673,18 @@
 	}
     }
 
-    if ( newentry ) {
-	printf( "%sadding new entry %s\n", not ? "!" : "", dn );
-    } else {
-	printf( "%smodifying entry %s\n", not ? "!" : "", dn );
+    if ( newentry )
+    {
+	if(statistics)
+    statistics_add++;
+	else
+    printf( "%sadding new entry %s\n", not ? "!" : "", dn );
+    } else
+    {
+	if(statistics)
+	    statistics_modify++;
+	else
+	    printf( "%smodifying entry %s\n", not ? "!" : "", dn );
     }
 
     if ( !not ) {
@@ -649,7 +694,10 @@
 	    i = ldap_modify_s( ld, dn, pmods );
 	}
 	if ( i != LDAP_SUCCESS ) {
-	    ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" );
+	    if(statistics)
+		statistics_error++;
+	    else
+		ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" );
 	} else if ( verbose ) {
 	    printf( "modify complete\n" );
 	}
@@ -657,7 +705,8 @@
 	i = LDAP_SUCCESS;
     }
 
-    putchar( '\n' );
+    if(!statistics)
+	putchar( '\n' );
 
     return( i );
 }
@@ -668,10 +717,16 @@
 {
     int	rc;
 
-    printf( "%sdeleting entry %s\n", not ? "!" : "", dn );
+    if(statistics)
+	statistics_delete++;
+    else
+	printf( "%sdeleting entry %s\n", not ? "!" : "", dn );
     if ( !not ) {
 	if (( rc = ldap_delete_s( ld, dn )) != LDAP_SUCCESS ) {
-	    ldap_perror( ld, "ldap_delete" );
+	    if(statistics)
+		statistics_error++;
+	    else
+		ldap_perror( ld, "ldap_delete" );
 	} else if ( verbose ) {
 	    printf( "delete complete" );
 	}
@@ -679,7 +734,8 @@
 	rc = LDAP_SUCCESS;
     }
 
-    putchar( '\n' );
+    if (!statistics)
+	putchar( '\n' );
 
     return( rc );
 }
@@ -695,11 +751,17 @@
 		newrdn, deleteoldrdn ? "do not " : "" );
     }
 
-    printf( "%smodifying rdn of entry %s\n", not ? "!" : "", dn );
+    if(statistics)
+	statistics_modrdn++;
+    else
+	printf( "%smodifying rdn of entry %s\n", not ? "!" : "", dn );
     if ( !not ) {
 	if (( rc = ldap_modrdn2_s( ld, dn, newrdn, deleteoldrdn ))
 		!= LDAP_SUCCESS ) {
-	    ldap_perror( ld, "ldap_modrdn" );
+	    if(statistics)
+		statistics_error++;
+	    else
+		ldap_perror( ld, "ldap_modrdn" );
 	} else {
 	    printf( "modrdn completed\n" );
 	}
@@ -707,7 +769,8 @@
 	rc = LDAP_SUCCESS;
     }
 
-    putchar( '\n' );
+    if(!statistics)
+	putchar( '\n' );
 
     return( rc );
 }
diff -urN ldap.temp/doc/man/man1/ldapmodify.1 ldap/doc/man/man1/ldapmodify.1
--- ldap.temp/doc/man/man1/ldapmodify.1	Tue Jan 19 18:07:30 1999
+++ ldap/doc/man/man1/ldapmodify.1	Mon Sep 27 21:51:07 1999
@@ -18,6 +18,8 @@
 [\c
 .BR \-k ]
 [\c
+.BR \-s ]
+[\c
 .BI \-d \ debuglevel\fR]
 [\c
 .BI \-D \ binddn\fR]
@@ -109,6 +111,10 @@
 Use Kerberos authentication instead of simple authentication.  It is
 assumed that you already have a valid ticket granting ticket.  You must
 compile with KERBEROS defined for this option to have any effect.
+.TP
+.B \-s
+Print out statistics in comma delimited spread-sheet format on standard
+output.  Use this to test the performance of an LDAP server.
 .TP
 .B \-K
 Same as \-k, but only does step 1 of the kerberos bind.  This is useful
