Overview

Following execution, you may want to review performance data to see what components were resource-hungry. This is particularly useful when designing new components, since it allows you to test optimizations in a straightforward way. We show a couple of variations of performance review, below.

Warnings
  • CPU timings are currently meaningless on Linux and OSX.

Procedure

  • Call brahms to execute the system.
  • Review performance data.
  • Turn on run-phase timing.
  • Turn off multi-threading.
  • Call brahms to execute the system.
  • Review performance data.

Example

Script

This example, along with the others in this section, can be found in the script developing_systems.m in the support/tutorial/system/matlab folder.

M Source Code (against 995)
% section header disp([10 '=== Review Performance ===' 10]) % execute the system [out, rep] = brahms(psys, exe); % review performance brahms_perf(rep); % turn on run-phase timing exe.execPars.TimeRunPhase = 1; % turn off multi-threading exe.execPars.MaxThreadCount = 1; % execute the system [out, rep] = brahms(psys, exe); % review performance brahms_perf(rep);

Expected Output

Notes
  • For this execution, the timings are all very brief periods, so measures such as "CPU loading" are extremely unreliable (range of 0 to 100 percent).
Matlab Console
=== Review Performance === Performance Monitoring from Voice 1 ________________________________________________________________ PROCESS INIT RUN TERM TOTAL ________________________________________________________________ sys/src 0.001 - 0.000 0.001 (sum) 0.001 - 0.000 0.001 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 (sum) 0.000 0.000 0.000 0.000 ________________________________________________________________ sys/dst 0.000 - 0.000 0.000 (sum) 0.000 - 0.000 0.000 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 (sum) 0.000 0.000 0.000 0.000 ________________________________________________________________ resamp 0.000 - 0.000 0.000 (sum) 0.000 - 0.000 0.000 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 (sum) 0.000 0.000 0.000 0.000 ________________________________________________________________ (caller thread) ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 ________________________________________________________________ (across threads) sum over processes 0.001 - 0.000 0.001 bracket timers 0.004 0.003 0.033 0.040 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 ________________________________________________________________ SUMMARY: CPU loading 0-100% run phase overhead (measured by CPU) 0-100% ---------------------------------------------------------------- (WARNING this value assumed) CPU ticker 64Hz wallclock ticker 2388.030MHz (OS timer) ---------------------------------------------------------------- process times are unavailable (BRAHMS runs faster like this) to get them, set Execution Parameter "TimeRunPhase" to true ________________________________________________________________ WARNING: 0: 0.012141 "TimeRunPhase == true" may slow down your fine-grained executions Performance Monitoring from Voice 1 ________________________________________________________________ PROCESS INIT RUN TERM TOTAL ________________________________________________________________ **sys/dst 0.000 0.000 0.000 0.000 **sys/src 0.001 0.000 0.000 0.001 **resamp 0.000 0.000 0.000 0.000 (sum) 0.001 0.000 0.000 0.001 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.000 0.000 0.000 0.000 (sum) 0.000 0.000 0.000 0.000 ________________________________________________________________ (caller thread) ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.016 0.000 0.000 0.016 ________________________________________________________________ (across threads) sum over processes 0.001 0.000 0.000 0.001 bracket timers 0.013 0.003 0.011 0.027 ---------------------------------------------------------------- USER (RUP 0-100%) 0.000 0.000 0.000 0.000 KERN 0.016 0.000 0.000 0.016 ________________________________________________________________ SUMMARY: CPU loading 0-100% run phase overhead (measured by wallclock) 99% run phase overhead (measured by CPU) 0-100% ---------------------------------------------------------------- (WARNING this value assumed) CPU ticker 64Hz wallclock ticker 2388.030MHz (OS timer) 90% of crunching within processes marked ** ________________________________________________________________