<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/cmd/measure.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/irb] Add "show_cmds" command to list all commands'</title>
<updated>2022-12-08T19:10:23+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-12-08T19:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3956bb859c2442d34ea171db8f92f3e5895c43d9'/>
<id>3956bb859c2442d34ea171db8f92f3e5895c43d9</id>
<content type='text'>
descriptions
(https://github.com/ruby/irb/pull/463)

https://github.com/ruby/irb/commit/7e857655ac
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
descriptions
(https://github.com/ruby/irb/pull/463)

https://github.com/ruby/irb/commit/7e857655ac
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Move `:stopdoc:` directive</title>
<updated>2022-03-14T05:40:28+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-03-14T05:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8760b270ed63e6fd7a1b40ef7fa1699ab272beef'/>
<id>8760b270ed63e6fd7a1b40ef7fa1699ab272beef</id>
<content type='text'>
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

https://github.com/ruby/irb/commit/86c41b06ad
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

https://github.com/ruby/irb/commit/86c41b06ad
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Add an explanation of default sub commands of "measure", which are :time and :stackprof</title>
<updated>2021-07-13T12:21:29+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-07-13T12:21:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d03c7da041cb426dfd269193818722279cebaa4'/>
<id>1d03c7da041cb426dfd269193818722279cebaa4</id>
<content type='text'>
https://github.com/ruby/irb/commit/759be5a344
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/759be5a344
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Allow "measure" command to take block</title>
<updated>2021-02-06T11:45:08+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-02-06T11:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5704b5fe5e42bd5b1f42a27368cd5d52dd5a9060'/>
<id>5704b5fe5e42bd5b1f42a27368cd5d52dd5a9060</id>
<content type='text'>
https://github.com/ruby/irb/commit/20f1ca23e9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/20f1ca23e9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Try not to register the exact same measuring method twice</title>
<updated>2020-12-24T14:26:22+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2020-12-24T13:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=167dc37632300e0061351ab87ddc89ebe9c5f53f'/>
<id>167dc37632300e0061351ab87ddc89ebe9c5f53f</id>
<content type='text'>
https://github.com/ruby/irb/commit/cc66b5573e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/cc66b5573e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Suppress "shadowing outer" warning</title>
<updated>2020-12-22T14:45:43+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2020-12-21T20:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0b14abe8e7610e81e6bac7a4696cdcc24ca164c0'/>
<id>0b14abe8e7610e81e6bac7a4696cdcc24ca164c0</id>
<content type='text'>
https://github.com/ruby/irb/commit/27b149c599
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/27b149c599
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Support arg for measure command</title>
<updated>2020-12-22T14:45:43+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2020-12-21T19:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4131cd05be4c00e2d6740d1619711e574cd731af'/>
<id>4131cd05be4c00e2d6740d1619711e574cd731af</id>
<content type='text'>
https://github.com/ruby/irb/commit/b43f35d8f3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/b43f35d8f3
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Add measure command</title>
<updated>2020-12-20T07:23:59+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2020-08-14T21:36:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9f08e3c703795e81d333d568e7e44743022468f1'/>
<id>9f08e3c703795e81d333d568e7e44743022468f1</id>
<content type='text'>
You can use "measure" command to check performance in IRB like below:

  irb(main):001:0&gt; 3
  =&gt; 3
  irb(main):002:0&gt; measure
  TIME is added.
  =&gt; nil
  irb(main):003:0&gt; 3
  processing time: 0.000058s
  =&gt; 3
  irb(main):004:0&gt; measure :off
  =&gt; nil
  irb(main):005:0&gt; 3
  =&gt; 3

You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also,
set custom performance check method:

  IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &amp;block|
    time = Time.now
    result = block.()
    now = Time.now
    puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE]
    result
  }

https://github.com/ruby/irb/commit/3899eaf2e2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You can use "measure" command to check performance in IRB like below:

  irb(main):001:0&gt; 3
  =&gt; 3
  irb(main):002:0&gt; measure
  TIME is added.
  =&gt; nil
  irb(main):003:0&gt; 3
  processing time: 0.000058s
  =&gt; 3
  irb(main):004:0&gt; measure :off
  =&gt; nil
  irb(main):005:0&gt; 3
  =&gt; 3

You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also,
set custom performance check method:

  IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &amp;block|
    time = Time.now
    result = block.()
    now = Time.now
    puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE]
    result
  }

https://github.com/ruby/irb/commit/3899eaf2e2
</pre>
</div>
</content>
</entry>
</feed>
