Usleep feature added according to Nathan's suggestions.
parent
0a103147ab
commit
1f1e56c363
|
@ -170,6 +170,8 @@ GENERAL:
|
|||
NOTE: it does not delay before a check write or
|
||||
check read
|
||||
|
||||
* interIODelay - this time in us (microseconds) after each I/O simulates computing time.
|
||||
|
||||
* outlierThreshold - gives warning if any task is more than this number
|
||||
of seconds from the mean of all participating tasks.
|
||||
If so, the task is identified, its time (start,
|
||||
|
|
|
@ -1839,11 +1839,17 @@ static IOR_offset_t WriteOrReadSingle(IOR_offset_t pairCnt, IOR_offset_t *offset
|
|||
backend->xfer(access, fd, buffer, transfer, test);
|
||||
if (amtXferred != transfer)
|
||||
ERR("cannot write to file");
|
||||
if (test->interIODelay > 0){
|
||||
usleep(test->interIODelay);
|
||||
}
|
||||
} else if (access == READ) {
|
||||
amtXferred =
|
||||
backend->xfer(access, fd, buffer, transfer, test);
|
||||
if (amtXferred != transfer)
|
||||
ERR("cannot read from file");
|
||||
if (test->interIODelay > 0){
|
||||
usleep(test->interIODelay);
|
||||
}
|
||||
} else if (access == WRITECHECK) {
|
||||
memset(checkBuffer, 'a', transfer);
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ typedef struct
|
|||
int repCounter; /* rep counter */
|
||||
int multiFile; /* multiple files */
|
||||
int interTestDelay; /* delay between reps in seconds */
|
||||
int interIODelay; /* delay after each I/O in us */
|
||||
int open; /* flag for writing or reading */
|
||||
int readFile; /* read of existing file */
|
||||
int writeFile; /* write of file */
|
||||
|
|
|
@ -167,6 +167,8 @@ void DecodeDirective(char *line, IOR_param_t *params)
|
|||
params->repetitions = atoi(value);
|
||||
} else if (strcasecmp(option, "intertestdelay") == 0) {
|
||||
params->interTestDelay = atoi(value);
|
||||
} else if (strcasecmp(option, "interiodelay") == 0) {
|
||||
params->interIODelay = atoi(value);
|
||||
} else if (strcasecmp(option, "readfile") == 0) {
|
||||
params->readFile = atoi(value);
|
||||
} else if (strcasecmp(option, "writefile") == 0) {
|
||||
|
|
Loading…
Reference in New Issue