summaryrefslogtreecommitdiff
path: root/source4/torture/nbench/nbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/nbench/nbench.c')
-rw-r--r--source4/torture/nbench/nbench.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index eb67e15fbb..f14da8cd15 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -46,6 +46,11 @@ static BOOL run_netbench(struct torture_context *tctx, struct smbcli_state *cli,
char *cname;
FILE *f;
BOOL correct = True;
+ double target_rate = lp_parm_double(-1, "torture", "targetrate", 0);
+
+ if (target_rate != 0) {
+ printf("Targetting %.4f MByte/sec\n", target_rate);
+ }
if (torture_nprocs == 1) {
if (!read_only && !torture_setup_dir(cli, "\\clients")) {
@@ -86,6 +91,8 @@ again:
nbio_time_delay(targett);
params++;
i--;
+ } else if (target_rate != 0) {
+ nbio_target_rate(target_rate);
}
if (i < 2 || params[0][0] == '#') continue;