Dear All,
We are still on arcmap 10.3.1. and now we migrate from Windows 7 to Windows 10. Users who already migrated experience severe performance issues.
What i'm trying to achieve is to log ArcMap startup time as an indicator of user-performance.
I tried to start ArcMap from python and that works even launching a blank MXD.
What doesn't work is the measure for t2. The script walks on while ArcMap is loading.
Does anyone see how this could be achieved? I thought maybe the is a way to lauch arcmap and running a script which would write a timestamp to a file...
Or should I forget this Idea and just use a stopwatch?
Thanks..
<SPAN class="keyword token">import</SPAN> os<SPAN class="punctuation token">,</SPAN> time
blank <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'P:\civ\Geo-Projecten_PT\HotFIX_KG\10.3.1_bwTools\_Proj\performance2020\Blank.mxd'</SPAN>
tfm <SPAN class="operator token">=</SPAN> <SPAN class="string token">'%H:%M:%S'</SPAN>
t1 <SPAN class="operator token">=</SPAN> time<SPAN class="punctuation token">.</SPAN>time<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
st1 <SPAN class="operator token">=</SPAN> time<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN>tfm<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">'start-time : '</SPAN> <SPAN class="operator token">+</SPAN> st1
os<SPAN class="punctuation token">.</SPAN>startfile<SPAN class="punctuation token">(</SPAN>blank<SPAN class="punctuation token">)</SPAN>
t2 <SPAN class="operator token">=</SPAN> time<SPAN class="punctuation token">.</SPAN>time<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
st2 <SPAN class="operator token">=</SPAN> time<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN>tfm<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">'time loaded : '</SPAN> <SPAN class="operator token">+</SPAN> st2
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">'ArcMap load-time: '</SPAN> <SPAN class="operator token">+</SPAN> str<SPAN class="punctuation token">(</SPAN>round<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>t2<SPAN class="operator token">-</SPAN>t1<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">'----------------------'</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">'-----Script end!------'</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>