Skip to content

Commit a397aac

Browse files
author
Charlie Savage
committed
Fixup create examples script.
1 parent 034b981 commit a397aac

File tree

10 files changed

+114
-1854
lines changed

10 files changed

+114
-1854
lines changed

create_examples.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
#
55
# Source from http://people.cs.uchicago.edu/~bomb154/154/maclabs/profilers-lab/
66

7-
require 'ruby-prof'
87
require 'fileutils'
9-
require 'ruby-prof/test/prime'
8+
9+
require 'ruby-prof'
10+
11+
gem_path = Gem.loaded_specs['ruby-prof'].full_gem_path
12+
prime_path = File.join(gem_path, 'test', 'prime.rb')
13+
require prime_path
1014

1115
# Generate example reports
1216
def generate_reports(result)

examples/primes.call_info.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
events: wall_time
2+
3+
fl=
4+
fn=Array::first
5+
0 0
6+
7+
fl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
8+
fn=Object::find_largest
9+
33 0
10+
cfl=
11+
cfn=Array::first
12+
calls=1 34
13+
34 0
14+
cfl=
15+
cfn=Integer::upto
16+
calls=1 38
17+
38 0
18+
19+
fl=
20+
fn=Integer::upto
21+
0 344000
22+
23+
fl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
24+
fn=Object::is_prime
25+
18 0
26+
cfl=
27+
cfn=Integer::upto
28+
calls=10000 20
29+
20 344000
30+
31+
fl=
32+
fn=Array::select
33+
0 0
34+
cfl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
35+
cfn=Object::is_prime
36+
calls=10000 28
37+
28 344000
38+
39+
fl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
40+
fn=Object::find_primes
41+
26 0
42+
cfl=
43+
cfn=Array::select
44+
calls=1 27
45+
27 344000
46+
47+
fl=
48+
fn=Kernel::rand
49+
0 0
50+
51+
fl=
52+
fn=Array::each_index
53+
0 16000
54+
cfl=
55+
cfn=Kernel::rand
56+
calls=10000 12
57+
12 0
58+
59+
fl=
60+
fn=Array::initialize
61+
0 0
62+
63+
fl=
64+
fn=Class::new
65+
0 0
66+
cfl=
67+
cfn=Array::initialize
68+
calls=1 0
69+
0 0
70+
71+
fl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
72+
fn=Object::make_random_array
73+
9 0
74+
cfl=
75+
cfn=Class::new
76+
calls=1 10
77+
10 0
78+
cfl=
79+
cfn=Array::each_index
80+
calls=1 11
81+
11 16000
82+
83+
fl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
84+
fn=Object::run_primes
85+
47 0
86+
cfl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
87+
cfn=Object::make_random_array
88+
calls=1 49
89+
49 16000
90+
cfl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
91+
cfn=Object::find_primes
92+
calls=1 52
93+
52 344000
94+
cfl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
95+
cfn=Object::find_largest
96+
calls=1 55
97+
55 0
98+
99+
fl=C:/msys64/usr/local/src/ruby-prof.github.io/create_examples.rb
100+
fn=Object::run
101+
27 0
102+
cfl=C:/msys64/usr/local/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/ruby-prof-1.0.0-x64-mingw32/test/prime.rb
103+
cfn=Object::run_primes
104+
calls=1 27
105+
27 360000
106+

examples/primes.callgrind.out.2540

Lines changed: 0 additions & 106 deletions
This file was deleted.

examples/primes.dot

Lines changed: 0 additions & 76 deletions
This file was deleted.

examples/primes.flat.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)