0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
This commit is contained in:
Eliot Horowitz 2009-01-03 13:01:29 -05:00
parent fdb7b856d3
commit 8c35ccfba6

View File

@ -30,6 +30,7 @@ int main(int argc, char* argv[], char *envp[] ) {
for( int i = 0; i < 50000; i++ ) {
fwrite("abc", 3, 1, f);
fflush(f);
fsync( fileno( f ) );
}
cout << "flush: " << t.millis() << "ms" << endl;
}
@ -39,6 +40,7 @@ int main(int argc, char* argv[], char *envp[] ) {
for( int i = 0; i < 500; i++ ) {
fwrite("abc", 3, 1, f);
fflush(f);
fsync( fileno( f ) );
sleepmillis(10);
}
cout << "flush with 5000 sleep: " << t.millis() << "ms" << endl;