ruby-changes:46800
From: k0kubun <ko1@a...>
Date: Sat, 27 May 2017 11:47:15 +0900 (JST)
Subject: [ruby-changes:46800] k0kubun:r58915 (trunk): benchmark: Rename to bm_erb_render.rb
k0kubun 2017-05-27 11:47:11 +0900 (Sat, 27 May 2017) New Revision: 58915 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58915 Log: benchmark: Rename to bm_erb_render.rb from bm_app_erb_render.rb. I'm told from ko1 that bm_app_* is namespace for Ruby applications, not for ERB and we should use bm_erb_* for ERB benchmark instead. Added files: trunk/benchmark/bm_erb_render.rb Removed files: trunk/benchmark/bm_app_erb_render.rb Index: benchmark/bm_app_erb_render.rb =================================================================== --- benchmark/bm_app_erb_render.rb (revision 58914) +++ benchmark/bm_app_erb_render.rb (nonexistent) @@ -1,26 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_app_erb_render.rb#L0 -require 'erb' - -data = DATA.read -max = 1_500_000 -title = "hello world!" -content = "hello world!\n" * 10 - -src = "def self.render(title, content); #{ERB.new(data).src}; end" -mod = Module.new -mod.instance_eval(src, "(ERB)") - -max.times do - mod.render(title, content) -end - -__END__ - -<html> - <head> <%= title %> </head> - <body> - <h1> <%= title %> </h1> - <p> - <%= content %> - </p> - </body> -</html> Property changes on: benchmark/bm_app_erb_render.rb ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -LF \ No newline at end of property Index: benchmark/bm_erb_render.rb =================================================================== --- benchmark/bm_erb_render.rb (nonexistent) +++ benchmark/bm_erb_render.rb (revision 58915) @@ -0,0 +1,26 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_erb_render.rb#L1 +require 'erb' + +data = DATA.read +max = 1_500_000 +title = "hello world!" +content = "hello world!\n" * 10 + +src = "def self.render(title, content); #{ERB.new(data).src}; end" +mod = Module.new +mod.instance_eval(src, "(ERB)") + +max.times do + mod.render(title, content) +end + +__END__ + +<html> + <head> <%= title %> </head> + <body> + <h1> <%= title %> </h1> + <p> + <%= content %> + </p> + </body> +</html> Property changes on: benchmark/bm_erb_render.rb ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +LF \ No newline at end of property -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/