Diskspeed: added extra sync and timeout before each test.
This commit is contained in:
1
src/cmd/.gitignore
vendored
1
src/cmd/.gitignore
vendored
@@ -11,6 +11,7 @@ comm
|
||||
cp
|
||||
dd
|
||||
df
|
||||
diskspeed
|
||||
du
|
||||
echo
|
||||
ed
|
||||
|
||||
@@ -33,11 +33,11 @@ SCRIPT = false nohup true #lorder mkdep
|
||||
# C programs that live in the current directory and do not need
|
||||
# explicit make lines.
|
||||
#
|
||||
STD = basename cal cat cb chgrp chmod cmp col comm cp dd du \
|
||||
echo ed fgrep file grep head hostid join kill last ln \
|
||||
mesg mkdir mv nice od pagesize pr printenv pwd rev rm rmail rmdir \
|
||||
size sleep sort split sum sync tail tar tee time touch tr \
|
||||
tsort tty uniq w wc whereis who diskspeed
|
||||
STD = basename cal cat cb chgrp chmod cmp col comm cp dd \
|
||||
diskspeed du echo ed fgrep file grep head hostid join \
|
||||
kill last ln mesg mkdir mv nice od pagesize pr printenv \
|
||||
pwd rev rm rmail rmdir size sleep sort split sum sync \
|
||||
tail tar tee time touch tr tsort tty uniq w wc whereis who
|
||||
|
||||
# C programs that live in the current directory and need explicit make lines.
|
||||
#
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define MAX_BLOCK_SZ 64 /* kbytes */
|
||||
@@ -153,6 +152,9 @@ int main(int argc, char **argv)
|
||||
* Write data to file.
|
||||
*/
|
||||
sync();
|
||||
usleep(200000);
|
||||
sync();
|
||||
usleep(200000);
|
||||
t0 = current_msec();
|
||||
nbytes = blocksize_kbytes * 1024;
|
||||
for (n=0; n<datasize_mbytes*1024/blocksize_kbytes; n++) {
|
||||
@@ -170,6 +172,9 @@ int main(int argc, char **argv)
|
||||
* Read data from file.
|
||||
*/
|
||||
sync();
|
||||
usleep(200000);
|
||||
sync();
|
||||
usleep(200000);
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
t0 = current_msec();
|
||||
for (n=0; n<datasize_mbytes*1024/blocksize_kbytes; n++) {
|
||||
|
||||
Reference in New Issue
Block a user