Index: tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt |
diff --git a/tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt b/tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt |
new file mode 100644 |
index 0000000000000000000000000000000000000000..15fd9bca3fb86a862745bb0864a18d51c082b073 |
--- /dev/null |
+++ b/tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt |
@@ -0,0 +1,53 @@ |
+[Motivation] |
+This tool is to compare the time cost of creating temporary files between using |
+GetTempFileName() Windows API and using the GUID-based method, especially when |
+there are already tens of thousands of temporary files in the target directory. |
+ |
+The problem setting can be referred to |
+https://bugs.chromium.org/p/chromium/issues/detail?id=711534 |
+ |
+[How to use it] |
+Please download the files (.cc, .sln, .vcxproj) and compile the code in Visual |
+Studio. Run "CreateTempFilesPerfEval.exe" either from the build directory or |
+from Visual Studio. No parameters are needed. This tool allows interaction with |
+the users. Once launched, you will see the following message on the console: |
+ |
+"Please enter # of files to create |
+(maximum 65535), or "quit" to end the program :" |
+ |
+Simply type in a number less than 65536 (e.g. 1000) and you will see: |
+ |
+"Please select method to create temp file names, |
+"t" for GetTempFileName |
+"g" for GUID-based |
+"b" for both |
+or "quit" to end the program :" |
+ |
+Just select the method(s) you want to try (e.g., "b"), and you will get output |
+like below: |
+ |
+GetTempFileName : |
+500 / 1000 --- 434 ms |
+1000 / 1000 --- 408 ms |
+File creation succeeds at |
+C:\Users\chengx\AppData\Local\Temp\TempDirGetTempFileName\, now clean all of them! |
+C:\Users\chengx\AppData\Local\Temp\TempDirGetTempFileName\ directory is deleted! |
+ |
+GUID-based : |
+500 / 1000 --- 423 ms |
+1000 / 1000 --- 429 ms |
+File creation succeeds at |
+C:\Users\chengx\AppData\Local\Temp\TempDirGuid\, now clean all of them! |
+C:\Users\chengx\AppData\Local\Temp\TempDirGuid\ directory is deleted! |
+ |
+It shows the time cost of creating every 500 temp files in milliseconds. |
+ |
+The temporary directories are created in the "Temp" directory as shown above. |
+The temp files are then created in the newly created temporary directories. |
+All of them are deleted by the program automatically. If the deletion fails for |
+some reason, you will see: |
+ |
+"[Attention] C:\Users\chengx\AppData\Local\Temp\TempDirGuid\ directory's deletion |
+fails, please take a look by yourself!" |
+ |
+ |