import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; public class FSyncPerfTest { static int NUM_FILES = 200; static int NUM_FILE_CHARS = 200; static boolean CPU_WORK = true; static File WORK_DIR = new File("D:\\tmp\\sync_test"); static String TEXT = "This is the text that we repeatedly write to the files. " + "It doesn't matter what this text contains, as we simply repeat it," + "until the file contains as many characters as we want/need"; public static void main(String[] args) throws IOException { //if (WORK_DIR.exists()) { // System.err.println("work dir exists! remove it before running this test: "+WORK_DIR.getAbsolutePath()); // System.exit(1); //} WORK_DIR.mkdirs(); int nfiles [] = { 10000 , 1000, 100 }; int nchars [] = { 100 , 1000, 10000 }; for (int k=0; k