From 81e7eca28691eba4f150fb5022e5bd491f76be1b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 7 Sep 2012 16:40:05 +0000 Subject: Fixed profiling to work under the new project layout git-svn-id: http://mc-server.googlecode.com/svn/trunk@844 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- VC2008/profile_run.cmd | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'VC2008/profile_run.cmd') diff --git a/VC2008/profile_run.cmd b/VC2008/profile_run.cmd index e2d9491e1..fa34ebd27 100644 --- a/VC2008/profile_run.cmd +++ b/VC2008/profile_run.cmd @@ -9,32 +9,64 @@ set pt="C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools" -set app="vc2008\Release profiled\mcserver.exe" -set output=MCServer_profiledata.vsp +set appdir=..\MCServer +set app=MCServer.exe +:: outputdir is relative to appdir! +set outputdir=..\Profiling +set output=%outputdir%\profile.vsp + + + + + +:: Must cd to MCServer's directory so that it can find settings.ini etc. +cd %appdir% + +::Create the output directory, if it didn't exist +mkdir %outputdir% -cd .. :: Start the profiler %pt%\vsperfcmd /start:sample /output:%output% +if errorlevel 1 goto haderror :: Launch the application via the profiler %pt%\vsperfcmd /launch:%app% +if errorlevel 1 goto haderror :: Shut down the profiler (this command waits, until the application is terminated) %pt%\vsperfcmd /shutdown +if errorlevel 1 goto haderror +:: cd to outputdir, so that the reports are generated there +cd %outputdir% + :: generate the report files (.csv) %pt%\vsperfreport /summary:all %output% /symbolpath:"srv*C:\Programovani\Symbols*http://msdl.microsoft.com/download/symbols" +if errorlevel 1 goto haderror + + + + + +goto finished + + + +:haderror +echo An error was encountered +pause +:finished -- cgit v1.2.3