File: start_test.rb

package info (click to toggle)
ruby-prof 0.6.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 412 kB
  • ctags: 343
  • sloc: ruby: 1,669; ansic: 1,138; makefile: 29
file content (24 lines) | stat: -rwxr-xr-x 256 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env ruby

require 'test/unit'
require 'ruby-prof'


def start
  RubyProf.start
end

def wait_around
  sleep(2)
end

def stop
  RubyProf.stop
end

start
wait_around
result = stop

printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT)