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..20712edc67e5d28bc110c9d82e045ffadc24ed85 |
--- /dev/null |
+++ b/tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt |
@@ -0,0 +1,46 @@ |
+[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 --- 398 ms |
+1000 / 1000 --- 397 ms |
+File creation succeeds at C:\src\TempDirGetTempFileName\, remember to clean all |
+of them! |
+ |
+GUID-based : |
+500 / 1000 --- 416 ms |
+1000 / 1000 --- 410 ms |
+File creation succeeds at C:\src\TempDirGuid\, remember to clean all of them!" |
+ |
+It shows the time cost of creating every 500 temp files in milliseconds. |
+ |
+[Don't forget] |
+Delete all those created temp files! They won't be deleted by the program |
stanisc
2017/04/14 18:46:00
Why doesn't the tool delete all those temp files a
chengx
2017/04/14 22:27:22
Good point! I have added folder+file deletion in t
|
+automatically! |
+ |
+ |