Remove unused include param/param.h.
[samba.git] / source4 / torture / rpc / bench.c
index 2619ac2d2547c71f00f45b4d7f18d5abf36af634..cacc1d3baa9927841e4ed0019603394011bb1c7b 100644 (file)
@@ -23,7 +23,6 @@
 #include "torture/torture.h"
 #include "librpc/gen_ndr/ndr_srvsvc_c.h"
 #include "torture/rpc/rpc.h"
-#include "param/param.h"
 
 /**************************/
 /* srvsvc_NetShare        */
@@ -68,11 +67,11 @@ static bool test_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 /*
   benchmark srvsvc netshareenumall queries
 */
-static bool bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+static bool bench_NetShareEnumAll(struct torture_context *tctx, struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
        struct timeval tv = timeval_current();
        bool ret = true;
-       int timelimit = lp_parm_int(global_loadparm, NULL, "torture", "timelimit", 10);
+       int timelimit = torture_setting_int(tctx, "timelimit", 10);
        int count=0;
 
        printf("Running for %d seconds\n", timelimit);
@@ -82,7 +81,7 @@ static bool bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                talloc_free(tmp_ctx);
                count++;
                if (count % 50 == 0) {
-                       if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
+                       if (torture_setting_bool(tctx, "progress", true)) {
                                printf("%.1f queries per second  \r", 
                                       count / timeval_elapsed(&tv));
                        }
@@ -112,7 +111,7 @@ bool torture_bench_rpc(struct torture_context *torture)
                return false;
        }
 
-       if (!bench_NetShareEnumAll(p, mem_ctx)) {
+       if (!bench_NetShareEnumAll(torture, p, mem_ctx)) {
                ret = false;
        }