<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Thread%3ATalk%3AVisualVM%2FSetting_VisualVM_Up%2Freply</id>
	<title>Thread:Talk:VisualVM/Setting VisualVM Up/reply - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Thread%3ATalk%3AVisualVM%2FSetting_VisualVM_Up%2Freply"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:VisualVM/Setting_VisualVM_Up/reply&amp;action=history"/>
	<updated>2026-05-02T20:43:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Thread:Talk:VisualVM/Setting_VisualVM_Up/reply&amp;diff=53705&amp;oldid=prev</id>
		<title>Beaming: Reply to Setting VisualVM Up</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Thread:Talk:VisualVM/Setting_VisualVM_Up/reply&amp;diff=53705&amp;oldid=prev"/>
		<updated>2017-11-06T02:58:28Z</updated>

		<summary type="html">&lt;p&gt;Reply to &lt;a href=&quot;/wiki/Thread:Talk:VisualVM/Setting_VisualVM_Up&quot; title=&quot;Thread:Talk:VisualVM/Setting VisualVM Up&quot;&gt;Setting VisualVM Up&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I do it with a special profiler class in my [[EvBotNG]] which is the part of my framelib. You can see the profiler class at [https://github.com/evgmik/robocode_bots.frame-lib/blob/master/misc/profiler.java profiler.java]. The examples of it use are sprinkled all over [[EvBotNG]]. In the essence, when you need&lt;br /&gt;
to start a timer for some code you say &amp;lt;code&amp;gt;profiler.start( &amp;quot;methodName&amp;quot; )&amp;lt;/code&amp;gt; and then at the end of the profiled code you say &amp;lt;code&amp;gt;profiler.stop( &amp;quot;methodName&amp;quot; )&amp;lt;/code&amp;gt;. Once you ready to see the stats, you call &amp;lt;code&amp;gt;profiler.formatAll( )&amp;lt;/code&amp;gt;.&lt;br /&gt;
I do it at the end of every round.&lt;br /&gt;
&lt;br /&gt;
This will print a nice looking statistic table which shows nested profiled chunks in a tree like structure. Something like&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
Profiler stats---------------------------&lt;br /&gt;
  times exec |      min |  average |      max |    total | method name&lt;br /&gt;
           9 |   3.1 mS |   3.6 mS |   5.9 mS |  32.0 mS | gameInfo.initBattle&lt;br /&gt;
       10430 |   1.2 mS |   3.0 mS |  22.7 mS |  31.0  S | gameInfo.ticCycle&lt;br /&gt;
       10430 | 108.8 uS | 842.2 uS |  17.9 mS |   8.8  S |   gameInfo.initTic&lt;br /&gt;
       10430 |   506 nS |   2.2 uS | 103.1 uS |  22.4 mS |     botsManager.initTic&lt;br /&gt;
       10430 |  96.1 uS | 586.0 uS |  17.7 mS |   6.1  S |     fighterBot.initTic eem.EvBotNG vtest&lt;br /&gt;
       10430 |   540 nS |   2.5 uS | 264.8 uS |  25.7 mS |       gunManager.initTic&lt;br /&gt;
       10430 |  89.1 uS | 570.1 uS |  17.7 mS |   5.9  S |       motion_exactPathDangerMotion.initTic&lt;br /&gt;
        9627 |  82.1 uS | 390.8 uS |  14.7 mS |   3.8  S |         choseNewPath with nTrials = 2&lt;br /&gt;
         803 | 605.2 uS |   2.4 mS |  17.7 mS |   2.0  S |         choseNewPath with nTrials = 20&lt;br /&gt;
       10430 |   383 nS |   1.4 uS |  52.5 uS |  14.2 mS |       processScheduledEnergyDrop&lt;br /&gt;
         200 |   3.5 uS | 144.0 uS |   3.5 mS |  28.8 mS |       removeBulletsOutsideOfHitRegion&lt;br /&gt;
       10172 |   2.7 uS | 106.5 uS |  10.4 mS |   1.1  S |     fighterBot.initTic jk.mega.DrussGT 3.2.1&lt;br /&gt;
       10172 |   458 nS |   1.6 uS |  80.4 uS |  16.1 mS |       gunManager.initTic&lt;br /&gt;
       10172 |   387 nS | 100.1 uS |  10.3 mS |   1.0  S |       processScheduledEnergyDrop&lt;br /&gt;
        2484 |  12.3 uS |  46.0 uS |   1.3 mS | 114.3 mS |         calcFiringSolutionGFdangers&lt;br /&gt;
       10430 |   4.5 uS | 126.7 uS |  12.8 mS |   1.3  S |     wavesManager.initTic&lt;br /&gt;
       10430 |  14.2 uS |   2.1 mS |  19.5 mS |  22.2  S |   gameInfo.run&lt;br /&gt;
        6655 | 130.3 uS |   1.1 mS |  16.5 mS |   7.4  S |     Thread.sleep&lt;br /&gt;
       10430 |   5.6 uS |   1.4 mS |  19.4 mS |  14.7  S |     fighterBot.manage eem.EvBotNG vtest&lt;br /&gt;
       10430 |   3.9 uS |   1.4 mS |  19.4 mS |  14.5  S |       gunManagerManage&lt;br /&gt;
        2369 |  14.5 uS |  55.3 uS |   4.8 mS | 131.1 mS |         calcFiringSolutionGFdangers&lt;br /&gt;
       10430 |   634 nS |  18.7 uS | 558.3 uS | 195.0 mS |         gunManagerManage.aimTheGun&lt;br /&gt;
       10430 |   574 nS |   1.3 mS |  19.4 mS |  13.9  S |         gunManagerManage.findTheBestTarget&lt;br /&gt;
       10172 |   440 nS |   2.0 uS |   1.1 mS |  20.4 mS |     fighterBot.manage jk.mega.DrussGT 3.2.1&lt;br /&gt;
---------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Beaming</name></author>
		
	</entry>
</feed>