summaryrefslogtreecommitdiffstats
path: root/AnvilStats/profile_run.cmd
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-04 15:35:44 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-04 15:35:44 +0200
commit75a1bd8a3761ed331739fe46e1b6b0c274717c60 (patch)
treeac917c0b88d5e8c25b65d206f050783c38d40dbc /AnvilStats/profile_run.cmd
parentAnvilStats: aborting calc for no input files. (diff)
downloadcuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar.gz
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar.bz2
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar.lz
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar.xz
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.tar.zst
cuberite-75a1bd8a3761ed331739fe46e1b6b0c274717c60.zip
Diffstat (limited to '')
-rw-r--r--AnvilStats/profile_run.cmd70
1 files changed, 70 insertions, 0 deletions
diff --git a/AnvilStats/profile_run.cmd b/AnvilStats/profile_run.cmd
new file mode 100644
index 000000000..2a9285614
--- /dev/null
+++ b/AnvilStats/profile_run.cmd
@@ -0,0 +1,70 @@
+@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="Release profiled"
+set app="Release profiled\AnvilStats.exe"
+set args="0 c:\Games\MLG\world\region"
+
+:: outputdir is relative to appdir!
+set outputdir=Profiling
+set output=profile.vsp
+
+
+
+
+
+::Create the output directory, if it didn't exist
+mkdir %outputdir%
+
+
+
+
+
+:: Start the profiler
+%pt%\vsperfcmd /start:sample /output:%outputdir%\%output%
+if errorlevel 1 goto haderror
+
+:: Launch the application via the profiler
+%pt%\vsperfcmd /launch:%app% /args:%args%
+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