Performance tests improved #247

Merged
merged 59 commits into from May 17, 2011

Projects

None yet

3 participants

@goncalossilva

Hi!

Last rubysoc I was halfway through adding support for benchmarking under Rubinius when I had to "abandon" the task because of the schedule (it was really low priority). I've been back at work on Rails' performance tests utilities and I've:

  • Improved YARV's support;
  • Added support for benchmarking and profiling under Rubinius and JRuby as well;
  • Added support for user-defined options;
  • Updated documentation accordingly.

I've worked with Wayne to get the necessary MRI 1.8/1.9 patches on rvm. The last of them was merged yesterday.

goncalossilva added some commits Jun 18, 2010
@goncalossilva goncalossilva performance tests now working accurately on 1.9, using Ruby with the …
…GCdata patch
92c0f17
@goncalossilva goncalossilva Merge branch 'master' of http://github.com/rails/rails d2c633b
@goncalossilva goncalossilva Merge branch 'master' of http://github.com/rails/rails cd2bbed
@goncalossilva goncalossilva Merge branch 'master' of http://github.com/rails/rails 6265850
@goncalossilva goncalossilva added support for more printers aff8215
@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails 9887f23
@goncalossilva goncalossilva check if RubyProf's WALL_TIME and PROCESS_TIME are available before u…
…sing them (similarly to other constants)
23be2c6
@goncalossilva goncalossilva move "check for ruby-prof" from AD/testing/performance_test to AS/tes…
…ting/performance, where it is actually required
a6e2222
@goncalossilva goncalossilva ruby-prof only makes sense in an MRI context 6e99bb6
@goncalossilva goncalossilva initial separation of RubyProf-specific code c50df63
@goncalossilva goncalossilva extracted more generic methods, added a note for methods that need to…
… be overridden by each implementation
e57d264
@goncalossilva goncalossilva using number_helper to pretty print some results 1151608
@goncalossilva goncalossilva check whether the user is using a supported ruby interpreter for benc…
…hmarking
18a81db
@goncalossilva goncalossilva renamed "mri" to "ruby", for consistency with RUBY_ENGINE 3ec79e4
@goncalossilva goncalossilva divide the ruby interpreter into mri and yarv for improved modularity 2fa426c
@goncalossilva goncalossilva added basic structure for Rubinius 995d543
@goncalossilva goncalossilva rubinius returns "rbx" for RUBY_ENGINE, not "rubinius" b0beba2
@goncalossilva goncalossilva removed leftovers from the copy-paste from mri 4fe86a3
@goncalossilva goncalossilva added missing require 9e9090f
@goncalossilva goncalossilva added time (wall, process, cpu) to rubinius' benchmarks cf29d90
@goncalossilva goncalossilva added memory size and allocations to rubinius' benchmarks c58e063
@goncalossilva goncalossilva added gc info (runs, time) to rubinius' benchmarks 417b2ba
@goncalossilva goncalossilva fixed time and size units (should be seconds / bytes), fixed typo whe…
…n counting memory allocations under rubinius
278344b
@goncalossilva goncalossilva added support for profiling under rubinius 3872cc4
@goncalossilva goncalossilva added basic structure for jruby 84fe2b8
@goncalossilva goncalossilva remove deprecated documentation 1a9b1ed
@goncalossilva goncalossilva :min_percent only makes sense in a RubyProf context 93a583e
@goncalossilva goncalossilva fix a bug where the GC wasn't being triggered at the start of the MRI…
… benchmarks
15bff5a
@goncalossilva goncalossilva removed duplication in rubinius' benchmark code ef988e1
@goncalossilva goncalossilva warn the user about unsupported benchmarking metrics he might have as…
…ked for
e17f608
@goncalossilva goncalossilva benchmarking metrics are also implementation-specific e6cb396
@goncalossilva goncalossilva added profiling and benchmarking capabilities to jruby (profiling is …
…crippled because of a jruby bug)
d6d059f
@goncalossilva goncalossilva we need test-unit on mri 1.9 983bd01
@goncalossilva goncalossilva improved options handling in performance tests c401ad9
@goncalossilva goncalossilva fixed a couple of hidden bugs 09bd0ee
@goncalossilva goncalossilva improved detection and feedback of supported/unsupported metrics 726b7ed
@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails into performa…
…nce_test
6f0caa1
@goncalossilva goncalossilva performance tests inherit from AD::PT and not AC::PT, fixed performan…
…ce test generator invocation (guide)
be0a2b8
@goncalossilva goncalossilva don't allow decimal places on the amount of objects and gc runs a35ba6c
@goncalossilva goncalossilva fixed a bug where rubinius was creating the profiling files as direct…
…ories
391ccda
@goncalossilva goncalossilva check if there is support for the specified metric when profiling 09cdd1c
@goncalossilva goncalossilva updated documentation because of the benchmark/profile improvements 6212749
@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails into performa…
…nce_test
b8f9a45
@goncalossilva goncalossilva profiling enabled under JRuby. Added documentation for workaround des…
…cribed in JRUBY-5650.
677ce63
@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails into performa…
…nce_test
5b2b513
@goncalossilva goncalossilva removed unused class declaration 65022ac
@goncalossilva goncalossilva don't use internal profiler methods on Rubinius and JRuby since we're…
… only measuring wall clock for now (and the APIs will/can change, respectively)
8d558cb
@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails into performa…
…nce_test
1c2b223
@dhh
Ruby on Rails member

@jeremy, can you take a look at this?

@goncalossilva

It would be great if @jeremy could take a look at this, since he wrote most of the original code. I think @wycats had a brief look, but I'm not sure.

Anyway, the easier way to start is to skim the new documentation (IMO):
http://dl.dropbox.com/u/1585962/performance_testing/performance_testing.html (specially chapter 1).
It gives an overview on all enhancements.

@goncalossilva goncalossilva Merge branch 'master' of https://github.com/rails/rails into performa…
…nce_test

Conflicts:
	activesupport/lib/active_support/testing/performance.rb
aec7456
@goncalossilva

Merged with master (25288c1 didn't apply cleanly).

@goncalossilva

I've changed both benchmarker and profiler to use the new performance testing tools. Consequently, they're more configurable and work under Rubinius and JRuby.

I've also updated the guide (and uploaded a new version to the url I've sent before).

@jeremy jeremy merged commit b77e032 into rails:master May 17, 2011
@goncalossilva

Thanks for merging this in, Jeremy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment