Skip to content

Commit

Permalink
Prefer Objects to GC as label
Browse files Browse the repository at this point in the history
  • Loading branch information
methodmissing committed Oct 9, 2008
1 parent a9fea27 commit e81e145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gc_benchmark.rb
Expand Up @@ -13,7 +13,7 @@ def countable_gc?
end end


def gc_counts( label, scope ) def gc_counts( label, scope )
$gc_stats << "GC #{scope} ( #{label} ) #{GC.count}" $gc_stats << "Objects #{scope} ( #{label} ) #{GC.count}"
end end


def with_gc_counts( label ) def with_gc_counts( label )
Expand All @@ -24,7 +24,7 @@ def with_gc_counts( label )


n = 1000 n = 1000


Benchmark.bm do |x| Benchmark.bmbm do |x|
x.report( 'With GC' ) do x.report( 'With GC' ) do
with_gc_counts( 'With GC' ) do with_gc_counts( 'With GC' ) do
n.times{ with_gc.c_async_query( 'SELECT * FROM user' ) } n.times{ with_gc.c_async_query( 'SELECT * FROM user' ) }
Expand Down

0 comments on commit e81e145

Please sign in to comment.