Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 7
- Log:
Initial import of RForum 0.2 sources from a downloaded Tarball.
RForum is a Ruby On Rails based forum and mail gateway service.
- Author:
- adh
- Date:
- Sat Jul 22 18:43:13 +0100 2006
- Size:
- 907 Bytes
- Properties:
- Property svn:executable is set
1 | #!/usr/bin/env ruby |
2 | if ARGV.empty? |
3 | $stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times]" |
4 | exit(1) |
5 | end |
6 | |
7 | # Keep the expensive require out of the profile. |
8 | $stderr.puts 'Loading Rails...' |
9 | require File.dirname(__FILE__) + '/../config/environment' |
10 | |
11 | # Define a method to profile. |
12 | if ARGV[1] and ARGV[1].to_i > 1 |
13 | eval "def profile_me() #{ARGV[1]}.times { #{ARGV[0]} } end" |
14 | else |
15 | eval "def profile_me() #{ARGV[0]} end" |
16 | end |
17 | |
18 | # Use the ruby-prof extension if available. Fall back to stdlib profiler. |
19 | begin |
20 | require 'prof' |
21 | $stderr.puts 'Using the ruby-prof extension.' |
22 | Prof.clock_mode = Prof::GETTIMEOFDAY |
23 | Prof.start |
24 | profile_me |
25 | results = Prof.stop |
26 | require 'rubyprof_ext' |
27 | Prof.print_profile(results, $stderr) |
28 | rescue LoadError |
29 | $stderr.puts 'Using the standard Ruby profiler.' |
30 | Profiler__.start_profile |
31 | profile_me |
32 | Profiler__.stop_profile |
33 | Profiler__.print_profile($stderr) |
34 | end |