33件ヒット
[1-33件を表示]
(0.084秒)
モジュール
- Benchmark (11)
- FileUtils (11)
-
Syslog
:: Macros (11)
検索結果
先頭3件
-
Syslog
:: Macros . # LOG _ UPTO(priority) -> Integer (12308.0) -
priorityまでのすべての優先度のマスクを作成します。
...のすべての優先度のマスクを作成します。
@param priority priority は優先度を示す定数を指定します。
詳しくは、Syslog::Levelを参照してください。
例:
require 'syslog'
Syslog.mask = Syslog::LOG_UPTO(Syslog::LOG_ERR)... -
FileUtils
. # uptodate?(newer , older _ list , options = nil) -> bool (12301.0) -
newer が、older_list に含まれるすべてのファイルより新しいとき真。 存在しないファイルは無限に古いとみなされます。
...@param options どのようなオプションも指定することはできません。
@raise ArgumentError options にオプションを指定した場合に発生します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.uptodate?('hello.o', ['hello.c', 'hello.h']) or system('make')
//}... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (131.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...%u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU......::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label
//emlist[][ruby]{
require 'benchmark'
n = 50000......a = "1"; end }
tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
[tf+tt+tu, (tf+tt+tu)/3]
end
#=>
#
# user system total real
# for: 1.016667 0.016667 1.033333 ( 0.485749)
# times: 1.450000 0.016667 1.466667 ( 0.681367)
# upto: 1.533333 0....