Skip to content

Commit c32bb3c

Browse files
author
Charlie Savage
committed
Updating documentation for 1.0 release.
1 parent bc58f29 commit c32bb3c

19 files changed

+3775
-356
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea

assets/ruby-prof-logo-blue.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/ruby-prof-logo-blue@2x.png

3.03 KB
Loading

assets/ruby-prof-logo-blue@3x.png

4.59 KB
Loading

assets/ruby-prof-logo-white.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/ruby-prof-logo-white@2x.png

2.75 KB
Loading

assets/ruby-prof-logo-white@3x.png

4.11 KB
Loading

assets/ruby-prof-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/styles.css

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
body {
2+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
3+
margin: 0;
4+
padding: 0;
5+
font-size: 16px;
6+
}
7+
8+
h1, h2, h3, h4, h5, h6 {
9+
margin-top: 1rem;
10+
margin-bottom: 0;
11+
}
12+
13+
h6 {
14+
font-size: 0.75rem;
15+
text-transform: uppercase;
16+
letter-spacing: 1.5px;
17+
color: rgba(255, 255, 255, 0.6);
18+
}
19+
20+
div.main {
21+
margin: 1em 2em;
22+
}
23+
24+
nav a {
25+
text-decoration: none;
26+
}
27+
28+
p {
29+
margin-top: 0.25em;
30+
}
31+
32+
pre {
33+
background-color: #e3e8fa;
34+
border-radius: 3px;
35+
font-size: 85%;
36+
line-height: 1.45;
37+
overflow: auto;
38+
background: #6573aa;
39+
padding: 16px;
40+
color: white;
41+
padding: 0.5em;
42+
}
43+
44+
li {
45+
margin-top: 0.75em;
46+
}
47+
48+
dt {
49+
font-weight: bold;
50+
display: list-item;
51+
margin-left: 4rem;
52+
}
53+
54+
dd {
55+
margin-top: 0.25rem;
56+
margin-bottom: 0.75rem;
57+
margin-left: 5rem;
58+
}
59+
60+
.header {
61+
background-color: #0D2483;
62+
color: white;
63+
padding: 1.5rem 2rem;
64+
}
65+
66+
.header > div {
67+
display: flex;
68+
flex-direction: row;
69+
align-items: center;
70+
}
71+
72+
.header h1 {
73+
margin-bottom: 0;
74+
}
75+
76+
.table-header {
77+
padding: 3rem 0 1rem;
78+
}
79+
80+
.table-wrapper {
81+
margin: 1rem auto;
82+
max-width: 1440px;
83+
padding: 4rem 5rem;
84+
background: white;
85+
border-radius: 0.5rem;
86+
}
87+
88+
.center {
89+
max-width: 1440px;
90+
margin: 0 auto;
91+
}
92+
93+
.layout-right {
94+
margin-left: auto;
95+
}
96+
97+
.text-right {
98+
display: flex;
99+
align-items: flex-end;
100+
flex-direction: column;
101+
}
102+
103+
.timestamp {
104+
font-size: 12px;
105+
margin-bottom: 1rem;[]
106+
color: rgba(255, 255, 255, 0.6);
107+
}
108+
109+
.logo {
110+
width: 140px;
111+
height: 30px;
112+
opacity: 0.5;
113+
background-repeat: no-repeat;
114+
background-image: url(ruby-prof-logo.svg);
115+
}
116+
117+
.ruby-constant { color: #7fffd4; background: transparent; }
118+
.ruby-keyword { color: #00ffff; background: transparent; }
119+
.ruby-ivar { color: #eedd82; background: transparent; }
120+
.ruby-operator { color: #00ffee; background: transparent; }
121+
.ruby-identifier { color: #ffdead; background: transparent; }
122+
.ruby-node { color: #ffa07a; background: transparent; }
123+
.ruby-comment { color: #dc0000; background: transparent; }
124+
.ruby-regexp { color: #ffa07a; background: transparent; }
125+
.ruby-value { color: #7fffd4; background: transparent; }
126+
127+
128+
.grid-container {
129+
display: grid;
130+
grid-template-columns: 15% 85%;
131+
grid-auto-rows: 2em;
132+
grid-gap: .5em;
133+
}

examples/flat.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
= Flat Profiles
2+
3+
Flat profiles show the total amount of time spent in each method.
4+
As an example, here is the output from running printers_test.rb.
5+
6+
Measure Mode: wall_time
7+
Thread ID: 70355159212340
8+
Fiber ID: 70355171633140
9+
Total: 0.060485
10+
Sort by: self_time
11+
12+
%self total self wait child calls name
13+
97.07 0.059 0.059 0.000 0.000 1001 Integer#upto
14+
0.92 0.059 0.001 0.000 0.059 1000 Object#is_prime
15+
0.66 0.060 0.000 0.000 0.059 1 Array#select
16+
0.59 0.000 0.000 0.000 0.000 1000 Kernel#rand
17+
0.50 0.001 0.000 0.000 0.000 1 Array#each_index
18+
0.20 0.000 0.000 0.000 0.000 1000 Kernel#respond_to_missing?
19+
0.01 0.000 0.000 0.000 0.000 1 Object#find_largest
20+
0.01 0.060 0.000 0.000 0.060 1 PrintersTest#setup
21+
0.01 0.060 0.000 0.000 0.060 1 Object#find_primes
22+
0.01 0.000 0.000 0.000 0.000 1 Class#new
23+
0.01 0.060 0.000 0.000 0.060 1 Object#run_primes
24+
0.00 0.000 0.000 0.000 0.000 1 Array#first
25+
0.00 0.001 0.000 0.000 0.001 1 Object#make_random_array
26+
0.00 0.000 0.000 0.000 0.000 1 Array#initialize
27+
28+
All values are in seconds.
29+
30+
The columns are:
31+
32+
%self - The percentage of time spent in this method, derived from self_time/total_time
33+
total - The time spent in this method and its children.
34+
self - The time spent in this method.
35+
wait - amount of time this method waited for other threads
36+
child - The time spent in this method's children.
37+
calls - The number of times this method was called.
38+
name - The name of the method.
39+
40+
Methods are sorted based on %self, therefore the methods that execute the longest are listed
41+
first.
42+
43+
For example, wee can see that Integer#upto took the most time, 0.059
44+
seconds. Method Object#is_prime calls this method, so the 0.59
45+
seconds appear as child time for Object#is_prime.
46+
47+
The interpretation of method names is:
48+
* MyObject#test - An instance method "test" of the class "MyObject"
49+
* <Object:MyObject>#test - The <> characters indicate a singleton method on a singleton class.
50+

0 commit comments

Comments
 (0)