File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Text ;
3
+ public class ProfilerSample1
4
+ {
5
+ static void Main ( string [ ] args )
6
+ {
7
+ int start = Environment . TickCount ;
8
+ for ( int i = 0 ; i < 1000 ; i ++ )
9
+ {
10
+ StringBuilder s = new StringBuilder ( ) ;
11
+ for ( int j = 0 ; j < 100 ; j ++ )
12
+ {
13
+ s . Append ( "Outer index = " ) ;
14
+ s . Append ( i ) ;
15
+ s . Append ( " Inner index = " ) ;
16
+ s . Append ( j ) ;
17
+ s . Append ( " " ) ;
18
+ }
19
+ }
20
+ Console . WriteLine ( "Program ran for {0} seconds" ,
21
+ 0.001 * ( Environment . TickCount - start ) ) ;
22
+ }
23
+ }
Original file line number Diff line number Diff line change @@ -3,4 +3,6 @@ http://msdn.microsoft.com/zh-cn/library/ms979205
3
3
4
4
#csc bat
5
5
csc /t:exe /out:ProfilerSample1.exe ProfilerSample1.cs
6
- csc /t:exe /out:ProfilerSample2.exe ProfilerSample2.cs
6
+ csc /t:exe /out:ProfilerSample2.exe ProfilerSample2.cs
7
+
8
+ csc /t:exe /out:ProfilerSample1.exe ProfilerSample1-1.cs
You can’t perform that action at this time.
0 commit comments