r22579: disable progress printing in the build-farm
[sfrench/samba-autobuild/.git] / source4 / torture / ldap / cldapbench.c
index 99ab69cee409df2f0e1408e5265e2052d8bd6b44..68a23ab11938e4a6b8e226078afff6a1486b0a1b 100644 (file)
@@ -76,9 +76,12 @@ static BOOL bench_cldap(TALLOC_CTX *mem_ctx, const char *address)
                        req->async.fn = request_handler;
                        num_sent++;
                        if (num_sent % 50 == 0) {
-                               printf("%.1f queries per second (%d failures)  \r", 
-                                      state->pass_count / timeval_elapsed(&tv),
-                                      state->fail_count);
+                               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                                       printf("%.1f queries per second (%d failures)  \r", 
+                                              state->pass_count / timeval_elapsed(&tv),
+                                              state->fail_count);
+                                       fflush(stdout);
+                               }
                        }
                }