Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rails] Calls mini-profile-resources/includes.tmpl, but no div is displayed #120

Open
aeldaly opened this issue Feb 20, 2013 · 3 comments
Open

Comments

@aeldaly
Copy link

aeldaly commented Feb 20, 2013

Running in rails development environment. Not showing up.

I see it calling:
http://localhost:3000/mini-profiler-resources/includes.tmpl?v=33d69ecf833daec8db07a9a0b6cf0bd3&_=1361324472050

And the response is:

<script id="profilerTemplate" type="text/x-jquery-tmpl">
{{if HasDuplicateSqlTimings}}!{{/if}} ${MiniProfiler.formatDuration(DurationMilliseconds)} ms
${Name} (${MiniProfiler.formatDuration(DurationMilliseconds)} ms) ${MachineName} on ${MiniProfiler.renderDate(Started)}
{{if HasSqlTimings}} {{/if}} {{each CustomTimingNames}} {{/each}} {{tmpl({timing:Root, page:this.data}) "#timingTemplate"}} {{if HasSqlTimings}} {{/if}} {{each CustomTimingNames}} {{/each}}
duration (ms) with children (ms) from start (ms)query time (ms)${$value.toLowerCase()} (ms)
{{if !ClientTimings}} {{tmpl "#linksTemplate"}} {{/if}} show time with children ${MiniProfiler.formatDuration(DurationMillisecondsInSql / DurationMilliseconds * 100)} % in sql ${MiniProfiler.formatDuration(CustomTimingStats[$value].Duration / DurationMilliseconds * 100)} % in ${$value.toLowerCase()}
{{if ClientTimings}} {{each MiniProfiler.getClientTimings(ClientTimings)}} {{/each}}
client event duration (ms) from start (ms)
${$value.name} {{if $value.duration >= 0}} ${MiniProfiler.formatDuration($value.duration)} {{/if}} +${MiniProfiler.formatDuration($value.start)}
{{tmpl "#linksTemplate"}}
{{/if}}
{{if HasSqlTimings}}
{{each(i, s) MiniProfiler.getSqlTimings(Root)}} {{tmpl({ g:s.prevGap }) "#sqlGapTemplate"}} {{tmpl({ i:i, s:s }) "#sqlTimingTemplate"}} {{if s.nextGap}} {{tmpl({ g:s.nextGap }) "#sqlGapTemplate"}} {{/if}} {{/each}}
step
time from start
query type
duration
call stack
query

show trivial gaps

{{/if}}
</script> <script id="linksTemplate" type="text/x-jquery-tmpl"> share {{if HasTrivialTimings}} show trivial {{/if}} </script> <script id="timingTemplate" type="text/x-jquery-tmpl"> ${MiniProfiler.renderIndent(timing.Depth)} ${timing.Name.slice(0,45)}{{if timing.Name && timing.Name.length > 45 }}...{{/if}} ${MiniProfiler.formatDuration(timing.DurationWithoutChildrenMilliseconds)} ${MiniProfiler.formatDuration(timing.DurationMilliseconds)} +${MiniProfiler.formatDuration(timing.StartMilliseconds)} {{if timing.HasSqlTimings}} {{if timing.HasDuplicateSqlTimings}}!{{/if}} ${timing.SqlTimings.length} sql ${MiniProfiler.formatDuration(timing.SqlTimingsDurationMilliseconds)} {{else}} {{/if}} {{each page.CustomTimingNames}} {{if timing.CustomTimings[$value]}} ${timing.CustomTimings[$value].length} ${$value.toLowerCase()} ${MiniProfiler.formatDuration(timing.CustomTimingStats[$value].Duration)} {{else}} {{/if}} {{/each}} {{if timing.HasChildren}} {{each timing.Children}} {{tmpl({timing: $value, page: page}) "#timingTemplate"}} {{/each}} {{/if}} </script> <script id="sqlTimingTemplate" type="text/x-jquery-tmpl">
${s.ParentTimingName}
T+${MiniProfiler.formatDuration(s.StartMilliseconds)} ms
{{if s.IsDuplicate}}DUPLICATE{{/if}} ${MiniProfiler.renderExecuteType(s.ExecuteType)}
${MiniProfiler.formatDuration(s.DurationMilliseconds)} ms
${s.StackTraceSnippet}
    <pre class="prettyprint lang-sql"><code>${s.FormattedCommandString}   </code></pre>
  </div>
</td>
</script> <script id="sqlGapTemplate" type="text/x-jquery-tmpl"> ${g.duration} ms
${g.topReason.name} — ${g.topReason.duration.toFixed(2)} ms
</script>

But the page is does not have any information overlaid on top of it.

Rails 2.3.12, Ruby 1.9.3, mysql2, mongoid

Thanks,
Ahmed

@aeldaly
Copy link
Author

aeldaly commented Feb 20, 2013

I even have this in the headers:

X-MiniProfiler-Ids ["a33lt42bgbphwtieupxm","5ycnj0dh12ta002pkstl","xifxwc5cppk8y63srdss","63lzyqh1cpmo90lqxqoo","8axv1rxex3ab48nytiby","rxbcb81qsvb7htyfi03y","p9uhpg07c3eo7oza5ter","md3yaifr4r32d5xg2la5","san0ol3i8q29jz82dxk7","6ilv3bow6vw3x6zvfeb7"]

@SamSaffron
Copy link
Owner

need more data, is the mini profiler snippet in the page, are there any js errors, what is the network tab in chrome showing.

@scaryguy
Copy link

Hi,

I'm using Rails 4 with Twitter Bootstrap. Mini Profiler divs are not shown.

I can see this code inside my html:

 <script async type="text/javascript" id="mini-profiler" src="/mini-profiler-resources/includes.js?v=8ceae04dd2abbc08ffe85a258d408292" data-version="8ceae04dd2abbc08ffe85a258d408292" data-path="/mini-profiler-resources/" data-current-id="qofh5a2blgh0dvnkbi23" data-ids="qofh5a2blgh0dvnkbi23,qwf45qcrrkiv2j8gp9l3,rlzo1ur370anrfrrgbps,9yukmf1gtgd1abtldodq,rsur8f8xdzqzqxl86zsi,1hzxd2tlw4o8yy81u478,678iblw4g5pezxys7tk8,4hzb8sf0jwufphi7yymt,3x3bg2oa826tiv9k42vp,1ti6vqqs77hjs26eryr9" data-position="left" data-trivial="false" data-children="false" data-max-traces="10" data-controls="false" data-authorized="true" data-toggle-shortcut="Alt+P" data-start-hidden="false"></script>

But I can't see profiler.

What could be the reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants