mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Add benchmark viewer
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Benchmarks.define('fizzbuzz_10000', Class.new do
|
||||
TEMPLATE = <<~LIQUID
|
||||
{% for i in (1..10000) %}{{ i }}
|
||||
{% endfor %}
|
||||
LIQUID
|
||||
|
||||
def compile
|
||||
@parsed = Liquid::Template.parse(TEMPLATE)
|
||||
end
|
||||
|
||||
def render
|
||||
@parsed.render
|
||||
end
|
||||
end.new)
|
||||
@@ -0,0 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../theme_runner'
|
||||
|
||||
Benchmarks.define('theme_runner', ThemeRunner.new)
|
||||
Reference in New Issue
Block a user