summaryrefslogtreecommitdiff
path: root/benchmark/irb_color.yml
blob: ebdc8d7e8b6e9226d55b21142ca1e6a03e6adf5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
prelude: |
  require 'irb/color'
  code = <<~'CODE'
    def self.foo # bar
      :"erb #{ERB.new("<%= self %>", trim_mode: ?-).result}"
    end
  CODE
benchmark:
  irb_color_complete: |
    IRB::Color.colorize_code(code, complete: true)
  irb_color_incomplete: |
    IRB::Color.colorize_code(code, complete: false)
loop_count: 2000000