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

Adding metrics to Profiler page #517

Merged
merged 2 commits into from
Jul 31, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions Resources/views/Collector/redis.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
</span>
</span>
{% else %}
<span class="label {{ collector.commandcount == 0 ? 'disabled' }}">
<span class="label label-status-{{ collector.erroredCommandsCount > 0 ? 'error' : '' }} {{ collector.commandcount == 0 ? 'disabled' }}">
<span class="icon">{{ include('@SncRedis/Collector/icon.svg.twig', {colors: {light: '#DDD', dark: '#999'}}) }}</span>
<strong>Redis</strong>
{% if 0 != collector.erroredCommandsCount %}
{% if collector.erroredCommandsCount > 0 %}
<span class="count">
<span>{{ collector.erroredCommandsCount }}</span>
</span>
Expand All @@ -102,6 +102,25 @@
<p{% if profiler_markup_version == 1 %} style="font-style:italic;"{% endif %}>No commands were executed or the logger is disabled.</p>
</div>
{% else %}
<div class="metrics">
<div class="metric">
<span class="value">{{ collector.commandcount }}</span>
<span class="label">Queries</span>
</div>

<div class="metric">
<span class="value">{{ '%0.2f'|format(collector.time) }} <span class="unit">ms</span></span>
<span class="label">Query time</span>
</div>

{% if collector.erroredCommandsCount > 0 %}
stefantalen marked this conversation as resolved.
Show resolved Hide resolved
<div class="metric highlight">
<span class="value error">{{ collector.erroredCommandsCount }}</span>
<span class="label">Failed Queries</span>
</div>
{% endif %}
</div>

<table class="alt">
<thead>
<tr>
Expand Down