Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Nov 5, 2022
1 parent d205bcf commit 80b5e98
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ task :memory do
require "rucaptcha"
require "memory_profiler"

RuCaptchaCore.create(5, 5)

report = MemoryProfiler.report do
1000.times do
RuCaptchaCore.create(5, 5)
Expand All @@ -53,6 +55,9 @@ end
task :benchmark do
require "rucaptcha"
require "benchmark/ips"

RuCaptchaCore.create(5, 5)

Benchmark.ips do |x|
x.report("Generate image") { RuCaptchaCore.create(5, 5) }
x.compare!
Expand Down

0 comments on commit 80b5e98

Please sign in to comment.