rubyperf 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/perf/report_format_html.rb +26 -2
- data/rubyperf.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
@@ -12,13 +12,37 @@ module Perf
|
|
12
12
|
PERCENT_FORMAT = "%.3f"
|
13
13
|
INDENT = " "*3
|
14
14
|
|
15
|
+
def initialize
|
16
|
+
super
|
17
|
+
@line=0
|
18
|
+
end
|
19
|
+
|
20
|
+
# Formats the header
|
15
21
|
def format_header(v)
|
16
|
-
"<table class='
|
22
|
+
"<table class='rubyperf_report'><tr>" \
|
23
|
+
"<th class='title'>#{v[:title]}</th>" \
|
24
|
+
"<th class='percent'>%</th>" \
|
25
|
+
"<th class='count'>count</th>" \
|
26
|
+
"<th class='user_time'>user</th>" \
|
27
|
+
"<th class='system_time'>system</th>" \
|
28
|
+
"<th class='total_time'>total</th>" \
|
29
|
+
"<th class='real_time'>real</th>" \
|
30
|
+
"</tr>"
|
17
31
|
end
|
18
32
|
|
33
|
+
# Formats the measure
|
19
34
|
def format_measure(v)
|
35
|
+
@line+=1
|
20
36
|
percent= v[:percent].is_a?(String) ? v[:percent] : (PERCENT_FORMAT%v[:percent])
|
21
|
-
"<tr
|
37
|
+
"<tr class='#{@line % 2==0 ? "even_row" : "odd_row"}'>" \
|
38
|
+
"<td class='title'>#{v[:title]}</td>" \
|
39
|
+
"<td class='percent'>#{percent}</td>" \
|
40
|
+
"<td class='count'>#{v[:count]}</td>" \
|
41
|
+
"<td class='user_time'>#{v[:time].utime}</td>" \
|
42
|
+
"<td class='system_time'>#{v[:time].stime}</td>" \
|
43
|
+
"<td class='total_time'>#{v[:time].total}</td>" \
|
44
|
+
"<td class='real_time'>#{v[:time].real}</td>" \
|
45
|
+
"</tr>"
|
22
46
|
end
|
23
47
|
|
24
48
|
def format_footer(v)
|
data/rubyperf.gemspec
CHANGED
metadata
CHANGED