You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added better output when doing time measurements of simulations.
- For now, I use xsltproc and gnuplot for transforming an xml representation of the time measurement (in addition to png thumbnails and svg plots)
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8051 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
<h1>Model information for <xsl:value-ofselect="modelinfo/name"/></h1>
37
+
38
+
<h2>Information</h2>
39
+
<p>All times are measured using a real-time wall clock. This means context switching produces bad worst-case execution times (max times) for blocks. If you want better results, use a CPU-time clock or run the command using real-time priviliges (avoiding context switches).</p>
40
+
<p>Note that for blocks where the individual execution time is close to the accuracy of the real-time clock, the maximum measured time may deviate a lot from the average.</p>
41
+
<p>For more details, see <ahref="{modelinfo/prefix}_prof.csv"><xsl:value-ofselect="modelinfo/name"/>_prof.csv</a>.</p>
42
+
43
+
<h2>Summary</h2>
44
+
<p>What solver/settings were used?</p>
45
+
<table>
46
+
<tr><thclass="name">Task</th><th>Time</th><th><abbrtitle="Fraction of total simulation time">Fraction</abbr></th></tr>
47
+
<tr><tdclass="name"><abbrtitle="Choosing solver, allocating data structures, etc (does not include reading the parameter start-values from file)">Pre-Initialization</abbr></td><td><xsl:value-ofselect="modelinfo/preinitTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/preinitTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
48
+
<tr><tdclass="name">Initialization</td><td><xsl:value-ofselect="modelinfo/initTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/initTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
49
+
<tr><tdclass="name">Event-handling</td><td><xsl:value-ofselect="modelinfo/eventTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/eventTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
50
+
<tr><tdclass="name">Creating output file</td><td><xsl:value-ofselect="modelinfo/outputTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/outputTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
51
+
<tr><tdclass="name">Linearization</td><td><xsl:value-ofselect="modelinfo/linearizeTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/linearizeTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
52
+
<tr><tdclass="name">Time steps (incl.integration?)</td><td><xsl:value-ofselect="modelinfo/totalStepsTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/totalStepsTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
53
+
<tr><tdclass="name">Overhead</td><td><xsl:value-ofselect="modelinfo/overheadTime"/></td><td><xsl:value-ofselect="format-number(100 * modelinfo/overheadTime div modelinfo/totalTime,'##0.00')"/>%</td></tr>
<tr><th> </th><th>Steps</th><th>Total Time</th><th><abbrtitle="Fraction of total simulation time">Fraction</abbr></th><th>Average Time</th><th><abbrtitle="The maximum accumulated time of this action during a single time step">Max Time</abbr></th><th><abbrtitle="Deviation from average execution time">Deviation</abbr></th></tr>
<td><xsl:value-ofselect="format-number((modelinfo/numStep * modelinfo/maxTime div modelinfo/totalStepsTime)-1,'##0.00')"/>x</td>
70
+
</tr>
71
+
</table>
72
+
73
+
<h2>Measured Function Calls</h2>
74
+
<table>
75
+
<tr><th> </th><thclass="name">Name</th><th>Calls</th><th>Time</th><th><abbrtitle="Fraction of total simulation time">Fraction</abbr></th><th><abbrtitle="The maximum accumulated time of this action during a single time step">Max Time</abbr></th><th><abbrtitle="Deviation from average execution time">Deviation</abbr></th></tr>
<td><xsl:value-ofselect="format-number(100 * time div /simulation/modelinfo/totalTime,'##0.00')"/>%</td>
83
+
<td><xsl:value-ofselect="maxTime"/></td>
84
+
<td><xsl:value-ofselect="format-number((ncall * maxTime div time)-1,'##0.00')"/>x</td>
85
+
</tr>
86
+
</xsl:for-each>
87
+
</table>
88
+
89
+
<h2>Measured Blocks</h2>
90
+
<table>
91
+
<tr><th> </th><thclass="name">Name</th><th>Calls</th><th>Time</th><th><abbrtitle="Fraction of total simulation time">Fraction</abbr></th><th><abbrtitle="The maximum accumulated time of this action during a single time step">Max Time</abbr></th><th><abbrtitle="Deviation from average execution time">Deviation</abbr></th></tr>
0 commit comments