Skip to Main Content Skip to Search
Product Documentation

xpcbench - xPC Target benchmark

Synopsis

MATLAB command line

xpcbench(model)
xpcbench(model,P1)
xpcbench(model,P1,P2)
xpcbench(model,P1,P2,P3)

Arguments

ArgumentValueDescription

model

'minimal'Benchmark the default minimal model.
'f14'Benchmark the default f14 model (one f14 system).
'f14*5'Benchmark the default f14*5 model (five copies of the f14 system).
'f14*10'Benchmark the default f14*10 model (ten copies of the f14 system).
'f14*25'Benchmark the default f14*25 model (25 copies of the f14 system).
'this'Benchmark all five default models (the default minimal model plus all four default f14 models).
'usermdl'Benchmark your model, usermdl.mdl.

Up to three optional arguments: P1, P2, and P3

'-reboot'Reboot the target computer after testing each model.
'-cleanup'Delete build files after running benchmarks.
'-verbose'Plot and display results in the MATLAB Command Window.

Description

xpcbench benchmarks the real-time execution performance of xPC Target applications on your target computer and compares the result with prestored benchmark results from other computers.

The prestored target computer benchmark results of five models (applications) are provided, each model compiled using a sampling of the currently supported compilers (see http://www.mathworks.com/support/compilers/current_release/). Compare these results with those for your target computer. Results are labeled by CPU type, CPU clock rate, and the compiler used to compile the application.

The five benchmark models are:

BenchmarkDescription
minimalBased on a minimal model consisting of just three blocks (Constant, Gain, Termination). This model has neither continuous nor discrete states. The result of this benchmark gives an impression about the target computer interrupt latencies.
f14Based on the standard Simulink example model f14. Type f14 in the MATLAB Command Window to open the model and view the model (62 blocks, 10 continuous states).
f14*5Five f14 systems modeled in subsystems (310 blocks, 50 continuous states). This benchmark is five times more demanding than benchmark F14.
f14*10Ten f14 systems (620 blocks, 100 continuous states).
f14*2525 f14 systems (1550 blocks, 250 continuous states).

xpcbench without an argument displays two plot figures, each containing different representations of the prestored target computer benchmark results. The first plot lists, for each target computer tested, the smallest achievable sample time for the five benchmarks, in microseconds. The second plot contains a bar graph of all computers, ranked by relative performance.

xpcbench(model) benchmarks your target computer using argument model. You can specify:

Before you run xpcbench, you must connect the host machine to the target computer and run the xPC Target test, xpctest, with no failures.

Benchmark execution can take several minutes to complete, including:

  1. Generating the benchmark models

  2. Building and downloading the xPC Target applications

  3. Searching for the smallest achievable sample time

  4. Displaying the performance results in the MATLAB Command Window, along with the prestored results for the other target computers

res = xpcbench returns the prestored benchmark results in a structure array with fields:

Field NameContents
MachineTarget computer information string containing CPU type, CPU speed, compiler
BenchResultsTarget computer benchmark performance for the five default models 'minimal', 'f14', 'f14*5', 'f14*10', 'f14*25'
DescTarget computer descriptor string containing machine type, RAM size, cache size

res = xpcbench(model) returns the benchmark results for model in a structure with fields:

Field NameContents
NameName of model
nBlocksNumber of blocks in model
BuildTimeElapsed time in seconds to build model
BenchTimeElapsed time in seconds to run benchmark for model
TsminMinimal achievable sample time in seconds for model

Examples

xpcbench

Prestored benchmark results showing what to expect of representative processors.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
res = xpcbench;
res(1)
ans = 

         Machine: 'Intel Celeron M  600MHz (VisualC10.0)'
    BenchResults: [1.0000e-05 1.4000e-05 2.5000e-05 
                  4.4000e-05 1.0800e-04]
            Desc: [1x70 char]

The array contains benchmark results for each processor type, in arbitrary order.

xpcbench

xpcbench('this')

Benchmark using the five default models.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
res = xpcbench('this');
res(1)
ans = 

         Name: 'Minimal'
      nBlocks: 3
    BuildTime: 28.2558
    BenchTime: 23.3845
        Tsmin: 8.3770e-06
xpcbench('this')

xpcbench('f14*5')

Benchmark using model f14*5 only.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
res = xpcbench('f14*5')
res
res = 

         Name: 'F14*5'
      nBlocks: 310
    BuildTime: 32.8377
    BenchTime: 29.7613
        Tsmin: 1.3148e-05
xpcbench('f14*5')
Benchmark results for model:               F14*5
Number of blocks in model:                 310
Elapsed time for model build (sec):        38.3
Elapsed time for model benchmark (sec):    29.7
Minimal achievable sample time (microsec): 14.1

xpcbench('this','-reboot')

Benchmark the target computer using the five default models, rebooting after each test.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
xpcbench('this','-reboot')

xpcbench('xpcosc','-cleanup','-verbose');

Benchmark the target computer using model xpcosc.mdl, delete the build files when done, and display full results in the MATLAB Command Window.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
xpcbench('xpcosc','-cleanup','-verbose');
Benchmark results for model:               xpcosc
Number of blocks in model:                 287
Elapsed time for model build (sec):        28.7
Elapsed time for model benchmark (sec):    26.1
Minimal achievable sample time (microsec): 5.5

res = xpcbench('this','-reboot','-cleanup','-verbose');

Benchmark the target computer using the five default models, reboot after each test, store the results in res, delete the build files when done, and display full results in the MATLAB Command Window.

Boot the target computer using your chosen method.

Connect it to the host computer.

xpctest
res = xpcbench('this','-reboot','-cleanup','-verbose');

res(1)
ans = 

         Name: 'Minimal'
      nBlocks: 3
    BuildTime: 51.2185
    BenchTime: 23.4161
        Tsmin: 4.9727e-06

See Also

xpctest

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS