提交 6f82f0a7 编写于 作者: J Justin Collins

Add start/end times and durations to reports

上级 f4746fbf
......@@ -482,7 +482,8 @@ class Brakeman::Report
Application path: #{File.expand_path tracker.options[:app_path]}
Rails version: #{rails_version}
Brakeman version: #{Brakeman::Version}
Generated at #{Time.now}
Started at #{tracker.start_time}
Duration: #{tracker.duration} seconds
Checks run: #{checks.checks_run.sort.join(", ")}
HEADER
end
......@@ -679,7 +680,10 @@ HEADER
:app_path => File.expand_path(tracker.options[:app_path]),
:rails_version => rails_version,
:security_warnings => all_warnings.length,
:timestamp => Time.now.to_s,
:start_time => tracker.start_time,
:end_time => tracker.end_time,
:timestamp => tracker.end_time,
:duration => tracker.duration,
:checks_performed => checks.checks_run.sort,
:number_of_controllers =>tracker.controllers.length,
# ignore the "fake" model
......
......@@ -27,14 +27,17 @@
<th>Application Path</th>
<th>Rails Version</th>
<th>Brakeman Version</th>
<th>Report Generation Time</th>
<th>Report Time</th>
<th>Checks Performed</th>
</tr>
<tr>
<td><%= File.expand_path tracker.options[:app_path] %></td>
<td><%= rails_version %></td>
<td><%= Brakeman::Version %>
<td><%= Time.now %></td>
<td>
<%= tracker.start_time %><br><br>
<%= tracker.duration %> seconds
</td>
<td><%= checks.checks_run.sort.join(", ") %></td>
</tr>
</table>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册