File tree Expand file tree Collapse file tree 3 files changed +28
-6
lines changed
Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 1+ name : Bench
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ name : Benchmarks
13+ steps :
14+ - uses : actions/checkout@v6
15+ - uses : ruby/setup-ruby@v1
16+ with :
17+ ruby-version : ' 3.4'
18+ - name : Install dependencies
19+ run : bundle install
20+
21+ - name : Generators benchmark
22+ run : RUBYOPT="-W0" bundle exec ruby benchmark/generators.rb
23+ - name : Load benchmark
24+ run : RUBYOPT="-W0" bundle exec ruby benchmark/load.rb
25+ - name : YML vs JSON benchmark
26+ run : RUBYOPT="-W0" bundle exec ruby benchmark/load_yml_vs_json.rb
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33require 'benchmark/ips'
4- require 'benchmark'
54
65if defined? ( Faker )
7- raise 'faker is defined before bench'
6+ puts 'faker is defined before running benchmark, undefining it'
7+ Object . send ( :remove_const , :Faker )
88end
99
1010path = File . expand_path ( "#{ File . dirname ( __FILE__ ) } /load_faker.rb" )
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- if defined? ( Faker )
4- raise 'faker is already defined...'
5- end
6-
73load ( File . expand_path ( "#{ File . dirname ( __FILE__ ) } /../lib/faker.rb" ) )
You can’t perform that action at this time.
0 commit comments