Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Simple Benchmarking : Benchmark « Development « Ruby
Ruby
Development
Benchmark
Simple Benchmarking
require
'benchmark'
puts Benchmark.measure { 10000.times { print
"."
} }
Related examples in the same category
1.
Because measure accepts code blocks, you can make it as elaborate
2.
Benchmark includes a way to make completing multiple tests more convenient.
3.
Benchmark inline c
4.
Benchmark reflection