summaryrefslogtreecommitdiffstats
path: root/VC2008/debug_profile_run.cmd
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 21:58:15 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 21:58:15 +0200
commit8289ac8ba736b7bb5effd41057c626b746c0c9c8 (patch)
tree692ff18ac89dcaed92e3ed05086263c7b1892d11 /VC2008/debug_profile_run.cmd
parentFixed the extreme strain on the world tick thread. (diff)
downloadcuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar.gz
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar.bz2
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar.lz
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar.xz
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.tar.zst
cuberite-8289ac8ba736b7bb5effd41057c626b746c0c9c8.zip
Diffstat (limited to 'VC2008/debug_profile_run.cmd')
-rw-r--r--VC2008/debug_profile_run.cmd73
1 files changed, 73 insertions, 0 deletions
diff --git a/VC2008/debug_profile_run.cmd b/VC2008/debug_profile_run.cmd
new file mode 100644
index 000000000..a078768d0
--- /dev/null
+++ b/VC2008/debug_profile_run.cmd
@@ -0,0 +1,73 @@
+@echo off
+::
+:: Profiling using a MSVC standalone profiler
+::
+:: See http://www.codeproject.com/Articles/144643/Profiling-of-C-Applications-in-Visual-Studio-for-F for details
+::
+
+
+
+
+set pt="C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools"
+set appdir=..\MCServer
+set app=MCServer_dbgprof.exe
+
+:: outputdir is relative to appdir!
+set outputdir=..\Profiling
+set outputname=profile.vsp
+set output=%outputdir%\%outputname%
+
+
+
+
+
+:: 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%
+
+
+
+
+
+:: 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 %outputname% /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