Sha256: 7bc9b270879e461c53554daf39f2bac95e37c328f2f9421ebd79b9936ff528fd

Contents?: true

Size: 642 Bytes

Versions: 5

Compression:

Stored size: 642 Bytes

Contents

require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/*_test.rb"]
end

task default: :test

task :benchmark do
  require "bundler/setup"
  Bundler.require
  require "benchmark/ips"

  str = StringIO.new
  logger = ::Logger.new(str)

  str2 = StringIO.new
  logger2 = ::Logger.new(str2)
  logger2.formatter = Logstop::Formatter.new

  Benchmark.ips do |x|
    x.report "logger" do
      logger.info "This is a string: test@test.com"
    end

    x.report "logger2" do
      logger2.info "This is a string: test@test.com"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
logstop-0.2.3 Rakefile
logstop-0.2.2 Rakefile
logstop-0.2.1 Rakefile
logstop-0.2.0 Rakefile
logstop-0.1.0 Rakefile