feat(lmxproxy): always show RPC Operations table, rename from 'Operations'
Table now displays all 5 RPC types (Read, ReadBatch, Write, WriteBatch, Subscribe) with dashes for zero-count operations instead of hiding the table entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -232,31 +232,38 @@ namespace ZB.MOM.WW.LmxProxy.Host.Status
|
||||
sb.AppendLine(" </div></div>");
|
||||
sb.AppendLine(" </div>");
|
||||
|
||||
// Operations table
|
||||
if (statusData.Performance.Operations.Count > 0)
|
||||
{
|
||||
sb.AppendLine(" <div class=\"card\">");
|
||||
sb.AppendLine(" <h3>Operations</h3>");
|
||||
sb.AppendLine(" <table>");
|
||||
sb.AppendLine(" <tr><th>Operation</th><th>Count</th><th>Success Rate</th><th>Avg (ms)</th><th>Min (ms)</th><th>Max (ms)</th><th>P95 (ms)</th></tr>");
|
||||
// RPC Operations table (always shown)
|
||||
sb.AppendLine(" <div class=\"card\">");
|
||||
sb.AppendLine(" <h3>RPC Operations</h3>");
|
||||
sb.AppendLine(" <table>");
|
||||
sb.AppendLine(" <tr><th>Operation</th><th>Count</th><th>Success Rate</th><th>Avg (ms)</th><th>Min (ms)</th><th>Max (ms)</th><th>P95 (ms)</th></tr>");
|
||||
|
||||
foreach (var op in statusData.Performance.Operations)
|
||||
// All known RPC operations — show each even if 0 calls
|
||||
var rpcNames = new[] { "Read", "ReadBatch", "Write", "WriteBatch", "Subscribe" };
|
||||
foreach (var rpcName in rpcNames)
|
||||
{
|
||||
var key = rpcName.Substring(0, 1).ToLowerInvariant() + rpcName.Substring(1);
|
||||
if (statusData.Performance.Operations.TryGetValue(key, out var op))
|
||||
{
|
||||
sb.AppendLine($" <tr>" +
|
||||
$"<td>{op.Key}</td>" +
|
||||
$"<td>{op.Value.TotalCount}</td>" +
|
||||
$"<td>{op.Value.SuccessRate:P1}</td>" +
|
||||
$"<td>{op.Value.AverageMilliseconds:F1}</td>" +
|
||||
$"<td>{op.Value.MinMilliseconds:F1}</td>" +
|
||||
$"<td>{op.Value.MaxMilliseconds:F1}</td>" +
|
||||
$"<td>{op.Value.Percentile95Milliseconds:F1}</td>" +
|
||||
$"<td>{rpcName}</td>" +
|
||||
$"<td>{op.TotalCount}</td>" +
|
||||
$"<td>{op.SuccessRate:P1}</td>" +
|
||||
$"<td>{op.AverageMilliseconds:F1}</td>" +
|
||||
$"<td>{op.MinMilliseconds:F1}</td>" +
|
||||
$"<td>{op.MaxMilliseconds:F1}</td>" +
|
||||
$"<td>{op.Percentile95Milliseconds:F1}</td>" +
|
||||
$"</tr>");
|
||||
}
|
||||
|
||||
sb.AppendLine(" </table>");
|
||||
sb.AppendLine(" </div>");
|
||||
else
|
||||
{
|
||||
sb.AppendLine($" <tr><td>{rpcName}</td><td>0</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendLine(" </table>");
|
||||
sb.AppendLine(" </div>");
|
||||
|
||||
// Detailed health (if available)
|
||||
if (statusData.DetailedHealth != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user