mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
Add rubocop to our build. (#5004)
This commit is contained in:
@ -4,7 +4,6 @@ require File.expand_path('../../../../config/environment', __FILE__)
|
||||
# set any flags here
|
||||
# MiniRacer::Platform.set_flags! :noturbo
|
||||
|
||||
|
||||
tests = [
|
||||
["tiny post", "**hello**"],
|
||||
["giant post", File.read("giant_post.md")],
|
||||
@ -28,7 +27,7 @@ PrettyText.v8.eval("window.commonmark = window.markdownit('commonmark')")
|
||||
# exit
|
||||
|
||||
Benchmark.ips do |x|
|
||||
[true,false].each do |sanitize|
|
||||
[true, false].each do |sanitize|
|
||||
tests.each do |test, text|
|
||||
x.report("#{test} sanitize: #{sanitize}") do
|
||||
PrettyText.markdown(text, sanitize: sanitize)
|
||||
@ -36,7 +35,6 @@ Benchmark.ips do |x|
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
tests.each do |test, text|
|
||||
x.report("markdown it no extensions commonmark #{test}") do
|
||||
PrettyText.v8.eval("window.commonmark.render(#{text.inspect})")
|
||||
@ -44,7 +42,6 @@ Benchmark.ips do |x|
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# 27-07-2017 - Sam's NUC
|
||||
#
|
||||
# v8 5.7
|
||||
@ -131,4 +128,3 @@ end
|
||||
# 1.448k (± 6.7%) i/s - 7.239k in 5.024831s
|
||||
# markdown it no extensions commonmark lots of mentions
|
||||
# 1.986k (± 5.2%) i/s - 9.990k in 5.044624s
|
||||
|
||||
|
Reference in New Issue
Block a user