2015-11-04 18:13:19 +00:00
|
|
|
- page_title t('sherlock.title'), t('sherlock.transaction'),
|
|
|
|
t('sherlock.file_sample')
|
|
|
|
|
|
|
|
- header_title t('sherlock.title'), sherlock_transactions_path
|
|
|
|
|
2016-04-25 20:02:15 +00:00
|
|
|
.row-content-block
|
2018-04-09 17:42:45 +00:00
|
|
|
.float-right
|
2015-11-04 18:13:19 +00:00
|
|
|
= link_to(sherlock_transaction_path(@transaction), class: 'btn') do
|
|
|
|
%i.fa.fa-arrow-left
|
|
|
|
= t('sherlock.transaction')
|
|
|
|
.oneline
|
|
|
|
= t('sherlock.file_sample')
|
|
|
|
= @file_sample.id
|
|
|
|
|
|
|
|
.prepend-top-default
|
|
|
|
%p
|
|
|
|
%span.light
|
|
|
|
#{t('sherlock.time')}:
|
|
|
|
%strong
|
|
|
|
= @file_sample.duration.round(2)
|
|
|
|
= t('sherlock.milliseconds')
|
|
|
|
%p
|
|
|
|
%span.light
|
|
|
|
#{t('sherlock.events')}:
|
|
|
|
%strong
|
|
|
|
= @file_sample.events
|
|
|
|
|
|
|
|
%article.file-holder
|
2017-02-05 22:28:48 +00:00
|
|
|
.js-file-title.file-title
|
2015-11-04 18:13:19 +00:00
|
|
|
%i.fa.fa-file-text-o.fa-fw
|
|
|
|
%strong
|
|
|
|
= @file_sample.file
|
|
|
|
.code.file-content.js-syntax-highlight
|
|
|
|
.line-numbers
|
|
|
|
%table.sherlock-line-samples-table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= t('sherlock.line_capitalized')
|
|
|
|
%th= t('sherlock.events')
|
|
|
|
%th= t('sherlock.time')
|
|
|
|
%th= t('sherlock.percent')
|
|
|
|
%tbody
|
|
|
|
- @file_sample.line_samples.each_with_index do |sample, index|
|
2016-12-26 10:47:16 +00:00
|
|
|
%tr{ class: sample.majority_of?(@file_sample.duration) ? 'slow' : '' }
|
2015-11-04 18:13:19 +00:00
|
|
|
%td= index + 1
|
|
|
|
%td= sample.events
|
|
|
|
%td
|
|
|
|
= sample.duration.round(2)
|
|
|
|
= t('sherlock.milliseconds')
|
|
|
|
%td
|
|
|
|
= sample.percentage_of(@file_sample.duration).round
|
|
|
|
= t('sherlock.percent')
|
|
|
|
|
|
|
|
.sherlock-file-sample
|
|
|
|
= highlight(@file_sample.file, @file_sample.source)
|