if (read_size > (1 << 20)) {
scale = read_size / (1 << 20);
}
+ int filecount = bench_files->len;
printf("Warming up file %d\n", warmup_counter);
- if (warmup_counter >= bench_files->len * scale)
+ if (warmup_counter >= filecount * scale)
return;
bf = &g_array_index(bench_files, struct bench_file,
- warmup_counter / scale);
- send_read_request(nfs, bf->inum, (warmup_counter % scale) << 20,
+ warmup_counter % filecount);
+ send_read_request(nfs, bf->inum, (warmup_counter / filecount) << 20,
read_size > (1 << 20) ? (1 << 20) : read_size);
warmup_counter++;
return;
}
if (connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) {
- fprintf(stderr, "Unable to connect to : %m\n");
+ fprintf(stderr, "Unable to connect to %s: %m\n", hostname);
}
freeaddrinfo(ai);
{
g_thread_init(NULL);
g_set_prgname("synclient");
- g_print("Launching synthetic NFS RPC client...\n");
bench_files = g_array_new(FALSE, TRUE, sizeof(struct bench_file));