Changeset 862
- Timestamp:
- 12/12/09 21:46:40 (3 years ago)
- Location:
- branches/atorf/personal playground/NXCProfiler
- Files:
-
- 6 added
- 1 modified
-
Analyzer/AnalyzeNXCProfile.py (modified) (1 diff)
-
Analyzer/sample2.nxc (added)
-
Analyzer/sample2.prf (added)
-
Analyzer/screenie_01.png (added)
-
Analyzer/screenie_02.png (added)
-
Analyzer/testit2.bat (added)
-
sample2.nxc (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/atorf/personal playground/NXCProfiler/Analyzer/AnalyzeNXCProfile.py
r861 r862 313 313 314 314 if (stats.ExecutionsSameMs[sectionNo] > 0): 315 parts.append('<td class="codeprofiledtimetd" align="center"> <br> <br><b>> %.3f s (%.0f%%)</b><br><br> + %d calls < 1ms</td>' % (stats.ElapsedTicks[sectionNo]/1000.0, stats.ElapsedTicks[sectionNo]/stats.ProfiledRunTime*100, stats.ExecutionsSameMs[sectionNo]))315 parts.append('<td class="codeprofiledtimetd" align="center"> <br> <br><b>> %.3f s (%.0f%%)</b><br><br>by %d%% of the calls</td>' % (stats.ElapsedTicks[sectionNo]/1000.0, stats.ElapsedTicks[sectionNo]/stats.ProfiledRunTime*100, (1-(stats.ExecutionsSameMs[sectionNo]/stats.ExecutionCount[sectionNo]))*100)) 316 316 else: 317 317 parts.append('<td class="codeprofiledtimetd" align="center"><b>> %.3f s (%.0f%%)</b></td>' % (stats.ElapsedTicks[sectionNo]/1000.0, stats.ElapsedTicks[sectionNo]/stats.ProfiledRunTime*100)) 318 318 #end if 319 319 320 maxmspercall = stats.ElapsedTicks[sectionNo] / stats.ExecutionCount[sectionNo] 321 if maxmspercall < 1: 322 percallstr = "< 1.0 ms ?" 320 321 maxmspercall = stats.ElapsedTicks[sectionNo] / stats.ExecutionCount[sectionNo] 322 if (stats.ExecutionsSameMs[sectionNo] > 0): 323 sameMsPerc = stats.ExecutionsSameMs[sectionNo] / stats.ExecutionCount[sectionNo] * 100 324 tickedPerc = 100 - sameMsPerc 325 if stats.ExecutionCount[sectionNo] == stats.ExecutionsSameMs[sectionNo]: 326 parts.append('<td class="codeprofiledmspercalltd" align="center"><b>< 1 ms </b></td>') 327 else: 328 tickedAvgPerCall = stats.ElapsedTicks[sectionNo] / (stats.ExecutionCount[sectionNo] - stats.ExecutionsSameMs[sectionNo]) 329 perc1str = ('%2d' % tickedPerc).replace(' ', ' ') 330 perc2str = ('%2d' % sameMsPerc).replace(' ', ' ') 331 parts.append('<td class="codeprofiledmspercalltd" align="center"> <br> <br>> %.1f ms (in %s%%)<br><br>< 1.0 ms (in %s%%)</td>' % (tickedAvgPerCall, perc1str, perc2str)) 332 #end if 323 333 else: 324 percallstr = "> %.1f ms" % maxmspercall 325 #end if 326 parts.append('<td class="codeprofiledmspercalltd" align="center">%s</td>' % percallstr) 334 335 if maxmspercall < 1: 336 percallstr = "< 1.0 ms ?" 337 else: 338 percallstr = "<b>> %.1f ms</b>" % maxmspercall 339 #end if 340 parts.append('<td class="codeprofiledmspercalltd" align="center">%s</td>' % percallstr) 341 327 342 328 343
