Rails Performance Test

Filed under:rails — posted by admin on July 19, 2009 @ 2:46 pm
  • Install ruby-prof gem

  • gem install ruby-prof

  • Prepare fixtures test/fixtures/xxx for testing. Test one by one as the following:

  • ruby test/unit/xxx_test.rb

  • Edit test/performance/browsing_test.rb

  • require 'test_helper'
    require 'performance_test_help'

    # Profiling results for each test method are written to tmp/performance.
    class BrowsingTest < ActionController::PerformanceTest
    def test_homepage
    get '/'
    end
    end

  • Benchmarking

  • rake test:benchmark


    Started
    BrowsingTest#test_homepage (1062 ms warmup)
    process_time: 406 ms
    memory: 0.00 KB
    objects: 0
    gc_runs: 0
    gc_time: 0 ms
    .
    Finished in 10.501 seconds.

    5 tests, 0 assertions, 0 failures, 0 errors

  • Profiling

  • rake test:profile


    Started
    BrowsingTest#test_homepage (858 ms warmup)
    process_time: 655 ms
    memory: unsupported
    objects: unsupported
    .
    Finished in 32.845 seconds.

    3 tests, 0 assertions, 0 failures, 0 errors

YoWant$ Stock Insider Reports

Filed under:web2.0 — posted by admin on July 8, 2009 @ 10:21 am

I want to make money through insiders.

“Insiders might sell their shares for many reasons, but they buy for only one: they think the price will rise”

- Peter Lynch

Get real-time insider trading reports and analysis
Visit YoWantS



image: detail of installation by Bronwyn Lace