Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 1.8 KB

File metadata and controls

75 lines (50 loc) · 1.8 KB

Contributing to Ruby Liquid2

Your contributions and questions are always welcome. Feel free to ask questions, report bugs or request features on the issue tracker or on Github Discussions. Pull requests are welcome too.

Development

The Golden Liquid Test Suite is included in this repository as a Git submodule. Clone the Ruby Liquid2 repository and initialize the submodule with something like this:

$ git clone git@github.com:jg-rp/ruby-liquid2.git
$ cd ruby-liquid2
$ git submodule update --init

We use Bundler and Rake. Install development dependencies with:

bundle install

Run tests with:

bundle exec rake test

Lint with:

bundle exec rubocop

And type check with:

bundle exec steep

Run one of the benchmarks with:

bundle exec ruby performance/benchmark.rb

Don't forget to benchmark with YJIT too:

bundle exec ruby --yjit performance/benchmark.rb

Profiling

CPU profile

Dump profile data with bundle exec ruby performance/profile.rb, then generate an HTML flame graphs with:

bundle exec stackprof --d3-flamegraph .stackprof-cpu-scan.dump > flamegraph-cpu-scan.html
bundle exec stackprof --d3-flamegraph .stackprof-cpu-parse.dump > flamegraph-cpu-parse.html
bundle exec stackprof --d3-flamegraph .stackprof-cpu-render.dump > flamegraph-cpu-render.html

Memory profile

Print memory usage to the terminal.

bundle exec ruby performance/memory_profile.rb

Don't forget to inspect memory usage with YJIT enabled too.

bundle exec ruby --yjit performance/memory_profile.rb