.comment-link {margin-left:.6em;}

.code

.. Hello Earthling .. \o/ :)

The "/time" switch
Thursday, April 14, 2005

Do you know there is a compiler switch which can calculate the time it
takes to do the compilation of file(s) you pass it? You can use it by
passing "/time" to the C# compiler. This results in the output of the
"elapsed time". The page on msdn titled "C# Compiler Options Listed
Alphabetically"
(ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/
dv_cscomp/html/43535ea0-ca47-4a15-b528-615087a86092.htm, this is whidbey beta1 msdn link [and is deliberately broken!!!])
does not list this switch, neither does it exists in the list if you
write "csc /?" at the windows console (csc of v1.1.4322). You can find its code in the
Rotor file sscli\clr\src\csharp\scharp\scc\scc.cpp. Additionally some
interesting code relating to timing can also be found in the file
sscli\clr\src\csharp\scharp\sccomp\timing.cpp. The comments on the
timing.cpp file reads:
"Defined the timer functions, which allow reporting performance
information for the compiler. This is sort of a built-in mini-profiler
that is always available. This allows anyone to do a quick
investigation of performance problems and try to pinpoint where things
have changed."

The "/time" switch works both in commercially available .net from Microsoft as well Rotor, but I could not find it working in Mono (mcs 1.0.5.0).


Comments: Post a Comment

Links to this post:

Create a Link



<< Home



Blogs:

MSDN Blogs
Joel Pobar
Don Syme

Friends:
Adeel
Aqeel
#Fahad
Haroon
Omer
Muhammad Ali
Lahore Food Blog

Links:
Rotor
CodeGuru
Mozilla
OpenSourceNokia
Tech Blog

Languages:
IronPython
F#

Archives

June 2004   July 2004   August 2004   September 2004   October 2004   November 2004   December 2004   February 2005   April 2005   June 2005   July 2005   September 2005   October 2005   November 2005   June 2007   December 2007   January 2008   March 2008   April 2008   June 2008   October 2008   February 2009   May 2009   June 2009   July 2009   August 2009   March 2011   June 2011   July 2011   September 2011   October 2011   November 2011   December 2012   May 2013   October 2013   May 2014   March 2015   July 2015   August 2015   December 2015   March 2016   July 2016   October 2016   November 2016  

This page is powered by Blogger. Isn't yours?