summaryrefslogtreecommitdiffstats
path: root/VC2008/profile_run.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'VC2008/profile_run.cmd')
-rw-r--r--VC2008/profile_run.cmd38
1 files changed, 35 insertions, 3 deletions
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
hhhhhh