Skip to content

Commit

Permalink
Speed up test by webmock 22.53sec to 611.60 millis
Browse files Browse the repository at this point in the history
⋊> ~/D/c/t/fixtures on v2-webmock ⨯ time be rake test                                                                                                                                                                                                               16:20:14
(in /Users/simon/Downloads/css_parser)
/Users/simon/.asdf/installs/ruby/3.2.2/bin/ruby -w -I"lib" /Users/simon/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb "test/rule_set/declarations/test_value.rb" "test/rule_set/test_declarations.rb" "test/test_css_parser_basic.rb" "test/test_css_parser_loading.rb" "test/test_css_parser_media_types.rb" "test/test_css_parser_misc.rb" "test/test_css_parser_offset_capture.rb" "test/test_css_parser_regexps.rb" "test/test_helper.rb" "test/test_merging.rb" "test/test_rule_set.rb" "test/test_rule_set_creating_shorthand.rb" "test/test_rule_set_expanding_shorthand.rb"
Run options: --seed 58367

# Running:

...........................................................................................................................................................................................................

Finished in 21.866189s, 9.2837 runs/s, 30.0464 assertions/s.

203 runs, 657 assertions, 0 failures, 0 errors, 0 skips

________________________________________________________
Executed in   22.53 secs      fish           external
   usr time  448.40 millis  139.00 micros  448.27 millis
   sys time  153.05 millis  984.00 micros  152.06 millis

⋊> ~/D/c/t/fixtures on v2-webmock ⨯ time be rake test                                                                                                                                                                                                               16:20:01
(in /Users/simon/Downloads/css_parser)
/Users/simon/.asdf/installs/ruby/3.2.2/bin/ruby -w -I"lib" /Users/simon/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb "test/rule_set/declarations/test_value.rb" "test/rule_set/test_declarations.rb" "test/test_css_parser_basic.rb" "test/test_css_parser_loading.rb" "test/test_css_parser_media_types.rb" "test/test_css_parser_misc.rb" "test/test_css_parser_offset_capture.rb" "test/test_css_parser_regexps.rb" "test/test_helper.rb" "test/test_merging.rb" "test/test_rule_set.rb" "test/test_rule_set_creating_shorthand.rb" "test/test_rule_set_expanding_shorthand.rb"
Run options: --seed 27120

# Running:

...........................................................................................................................................................................................................

Finished in 0.047695s, 4256.2113 runs/s, 13775.0288 assertions/s.

203 runs, 657 assertions, 0 failures, 0 errors, 0 skips

________________________________________________________
Executed in  611.60 millis    fish           external
   usr time  356.27 millis    0.09 millis  356.17 millis
   sys time  106.73 millis    1.31 millis  105.42 millis
  • Loading branch information
stoivo committed May 29, 2024
1 parent faab4cb commit 12e9027
Show file tree
Hide file tree
Showing 6 changed files with 584 additions and 39 deletions.
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ gemspec

gem 'benchmark-ips'
gem 'bump'
gem 'maxitest'
gem 'memory_profiler'
gem 'rake'

gem 'maxitest'
gem 'webmock', '~> 3.23'

gem 'rubocop'
gem 'rubocop-rake'
gem 'webrick'

gem 'debug', '~> 1.9', platforms: [:mri, :mingw, :x64_mingw]
13 changes: 11 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
benchmark-ips (2.13.0)
bigdecimal (3.1.8)
bigdecimal (3.1.8-java)
bump (0.10.0)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
hashdiff (1.1.0)
io-console (0.7.2)
io-console (0.7.2-java)
irb (1.13.1)
Expand Down Expand Up @@ -67,7 +73,10 @@ GEM
ruby-progressbar (1.13.0)
stringio (3.1.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
arm64-darwin-22
Expand All @@ -84,7 +93,7 @@ DEPENDENCIES
rake
rubocop
rubocop-rake
webrick
webmock (~> 3.23)

BUNDLED WITH
2.4.12
Loading

0 comments on commit 12e9027

Please sign in to comment.