Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Development tools > bench_run

bench_run

ベンチマークテストを実行

呼び出し手順

bench_run()
bench_run(module[,test_name[,options]])

引数

module

文字列ベクトル. モジュール名またはツールボックスの絶対パスを指定します.

test_name

文字列ベクトル

options

文字列ベクトル

  • list : モジュールで利用可能なベンチマークテストのリスト

  • help : Scilabコンソールにいくつかの使用例を表示

  • nb_run=value : ベンチマークテストを指定回数反復実行

説明

ベンチマークテストライブラリの .tst ファイルを探して実行し,実行時間に関する レポートを表示します. .tst ファイルはSCI+"/modules/*/tests/benchmark"ディレクトリで探されます.

テスト処理を制御しやすくするために,.tstファイルに特殊なタグを挿入できます. これらのタグはScilabコメントとして記入します.

利用可能なタグを以下に示します :

  • <-- BENCH NB RUN : 10 --> このテストは10回反復実行されます.

  • <-- BENCH START --> <-- BENCH END --> ベンチマークの関心がある部分をこれらのタグで括りますThe

bench_runを実行例をいくつか示します

// 全てのテストを実行
bench_run();
bench_run([]);
bench_run([],[]);

// 1つまたは複数のモジュールをテスト
bench_run('core');
bench_run('core',[]);
bench_run(['core','string']);

// 指定したモジュールの1つまたは複数のテストを実行
bench_run('core',['trycatch','opcode']);

// オプションを指定
bench_run([],[],'list');
bench_run([],[],'help');
bench_run([],[],'nb_run=2000');

ベンチマークファイルの例. このファイルはファイル SCI/modules/linear_algebra/tests/benchmarks/bench_chol.tstに対応します.

// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2007-2008 - INRIA
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================

//==============================================================================
// Benchmark for chol function
//==============================================================================

// <-- BENCH NB RUN : 10 -->

stacksize(30000000);

a = 0;
b = 0;
a = rand(900, 900, 'n');
a = a'*a;

// <-- BENCH START -->
b = chol(a);
// <-- BENCH END -->

テストの結果

-->bench_run('linear_algebra','bench_chol')

           For Loop (as reference) ...........................      143.00 ms [ 1000000 x]

  001/001 - [linear_algebra] bench_chol ......................      130.60 ms [      10 x]

参照

Report an issue
<< Assert Development tools example_run >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:19:08 CEST 2014