Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: tools/win/CreateTempFilesPerfEvaluation/ReadMe.txt

Issue 2810333008: A tool to evaluate methods in creating temp files (Closed)
Patch Set: Use TEMP directory, delete all created temp folder/files automatically Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 --- 434 ms
31 1000 / 1000 --- 408 ms
32 File creation succeeds at
33 C:\Users\chengx\AppData\Local\Temp\TempDirGetTempFileName\, now clean all of the m!
34 C:\Users\chengx\AppData\Local\Temp\TempDirGetTempFileName\ directory is deleted!
35
36 GUID-based :
37 500 / 1000 --- 423 ms
38 1000 / 1000 --- 429 ms
39 File creation succeeds at
40 C:\Users\chengx\AppData\Local\Temp\TempDirGuid\, now clean all of them!
41 C:\Users\chengx\AppData\Local\Temp\TempDirGuid\ directory is deleted!
42
43 It shows the time cost of creating every 500 temp files in milliseconds.
44
45 The temporary directories are created in the "Temp" directory as shown above.
46 The temp files are then created in the newly created temporary directories.
47 All of them are deleted by the program automatically. If the deletion fails for
48 some reason, you will see:
49
50 "[Attention] C:\Users\chengx\AppData\Local\Temp\TempDirGuid\ directory's deletio n
51 fails, please take a look by yourself!"
52
53
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698