-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fa426c
commit 995d543
Showing
3 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
activesupport/lib/active_support/testing/performance/rubinius.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,61 @@ | |||
module ActiveSupport | |||
module Testing | |||
module Performance | |||
protected | |||
def run_gc | |||
end | |||
|
|||
module Metrics | |||
class Base | |||
def profile | |||
yield | |||
end | |||
|
|||
protected | |||
def with_gc_stats | |||
yield | |||
end | |||
end | |||
|
|||
class Time < Base; end | |||
|
|||
class ProcessTime < Time | |||
def measure; 0; end | |||
end | |||
|
|||
class WallTime < Time | |||
def measure; 0; end | |||
end | |||
|
|||
class CpuTime < Time | |||
def measure; 0; end | |||
end | |||
|
|||
class Memory < Base | |||
def measure; 0; end | |||
end | |||
|
|||
class Objects < Amount | |||
def measure; 0; end | |||
end | |||
|
|||
class GcRuns < Amount | |||
def measure; 0; end | |||
end | |||
|
|||
class GcTime < Time | |||
def measure; 0; end | |||
end | |||
end | |||
end | |||
end | |||
end | |||
|
|||
if RUBY_VERSION >= '1.9.2' | |||
require 'active_support/testing/performance/ruby/yarv' | |||
elsif RUBY_VERSION >= '1.8.6' | |||
require 'active_support/testing/performance/ruby/mri' | |||
else | |||
$stderr.puts 'Update your ruby interpreter to be able to run benchmarks.' | |||
exit | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters