#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_srvsvc_c.h"
#include "torture/rpc/rpc.h"
-#include "param/param.h"
/**************************/
/* srvsvc_NetShare */
/*
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);
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));
}
return false;
}
- if (!bench_NetShareEnumAll(p, mem_ctx)) {
+ if (!bench_NetShareEnumAll(torture, p, mem_ctx)) {
ret = false;
}