test/benchmark.rb in logging-0.3.1 vs test/benchmark.rb in logging-0.4.0
- old
+ new
@@ -1,6 +1,6 @@
-# $Id: benchmark.rb 2 2007-01-09 18:10:50Z tim_pease $
+# $Id: benchmark.rb 34 2007-02-28 21:42:41Z tim_pease $
begin
require 'logging'
rescue LoadError
require 'rubygems'
@@ -21,16 +21,15 @@
module Logging
class Benchmark
def run
- this_many = 100_000
+ this_many = 300_000
sio = StringIO.new
- ::Logging::Logger[:root].level = 'warn'
- logging = ::Logging::Logger[self]
- logging.add ::Logging::Appenders::IO.new('benchmark', sio)
+ logging = ::Logging.logger sio
+ logging.level = :warn
logger = ::Logger.new sio
logger.level = ::Logger::WARN
log4r = if $log4r