OLD | NEW |
---|---|
(Empty) | |
1 [Motivation] | |
2 This tool is to compare the time cost of creating temporary files between using | |
3 GetTempFileName() Windows API and using the GUID-based method, especially when | |
4 there are already tens of thousands of temporary files in the target directory. | |
5 | |
6 The problem setting can be referred to | |
7 https://bugs.chromium.org/p/chromium/issues/detail?id=711534 | |
8 | |
9 [How to use it] | |
10 Please download the files (.cc, .sln, .vcxproj) and compile the code in Visual | |
11 Studio. Run "CreateTempFilesPerfEval.exe" either from the build directory or | |
12 from Visual Studio. No parameters are needed. This tool allows interaction with | |
13 the users. Once launched, you will see the following message on the console: | |
14 | |
15 "Please enter # of files to create | |
16 (maximum 65535), or "quit" to end the program :" | |
17 | |
18 Simply type in a number less than 65536 (e.g. 1000) and you will see: | |
19 | |
20 "Please select method to create temp file names, | |
21 "t" for GetTempFileName | |
22 "g" for GUID-based | |
23 "b" for both | |
24 or "quit" to end the program :" | |
25 | |
26 Just select the method(s) you want to try (e.g., "b"), and you will get output | |
27 like below: | |
28 | |
29 "GetTempFileName : | |
30 500 / 1000 --- 398 ms | |
31 1000 / 1000 --- 397 ms | |
32 File creation succeeds at C:\src\TempDirGetTempFileName\, remember to clean all | |
33 of them! | |
34 | |
35 GUID-based : | |
36 500 / 1000 --- 416 ms | |
37 1000 / 1000 --- 410 ms | |
38 File creation succeeds at C:\src\TempDirGuid\, remember to clean all of them!" | |
39 | |
40 It shows the time cost of creating every 500 temp files in milliseconds. | |
41 | |
42 [Don't forget] | |
43 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
| |
44 automatically! | |
45 | |
46 | |
OLD | NEW |