44件ヒット
[1-44件を表示]
(0.112秒)
クラス
-
Benchmark
:: Tms (11) - SystemExit (11)
検索結果
先頭4件
-
Kernel
# xsystem(command , opts = nil) -> () (15145.0) -
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
...
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。......:werror というキーに真を指定すると
@see Kernel.#system... -
SystemExit
# status -> Integer (3007.0) -
例外オブジェクトに保存された終了ステータスを返します。
...返します。
終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。
例:
begin
exit 1
rescue SystemExit => err
p err.status # => 1
end
begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end... -
FileUtils
# sh(*cmd) {|result , status| . . . } (25.0) -
与えられたコマンドを実行します。
...は Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exe......c, Kernel.#system... -
Benchmark
:: Tms # format(fmtstr = nil , *args) -> String (19.0) -
self を指定されたフォーマットで整形して返します。
...して返します。
このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemon......stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実...