HBASE-23855: Change bytes size to human readable size for Server Metrics of RegionServer Web UI (#1175)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
GeorryHuang 2020-02-17 09:14:53 +08:00 committed by GitHub
parent 68f4fd1ee2
commit e11dbf36a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -238,20 +238,20 @@ ByteBuffAllocator bbAllocator;
</%args>
<table class="table table-striped">
<tr>
<th>Total Heap Allocation(Bytes)</th>
<th>Total Pool Allocation(Bytes)</th>
<th>Total Heap Allocation</th>
<th>Total Pool Allocation</th>
<th>Heap Allocation Ratio</th>
<th>Total Buffer Count</th>
<th>Used Buffer Count</th>
<th>Buffer Size(Bytes)</th>
<th>Buffer Size</th>
</tr>
<tr>
<td><% ByteBuffAllocator.getHeapAllocationBytes(bbAllocator, ByteBuffAllocator.HEAP) %></td>
<td><% bbAllocator.getPoolAllocationBytes() %></td>
<td><% TraditionalBinaryPrefix.long2String(ByteBuffAllocator.getHeapAllocationBytes(bbAllocator, ByteBuffAllocator.HEAP), "B", 1) %></td>
<td><% TraditionalBinaryPrefix.long2String(bbAllocator.getPoolAllocationBytes(), "B", 1) %></td>
<td><% String.format("%.3f", ByteBuffAllocator.getHeapAllocationRatio(bbAllocator, ByteBuffAllocator.HEAP) * 100) %><% "%" %></td>
<td><% bbAllocator.getTotalBufferCount() %></td>
<td><% bbAllocator.getUsedBufferCount() %></td>
<td><% bbAllocator.getBufferSize() %></td>
<td><% TraditionalBinaryPrefix.long2String(bbAllocator.getBufferSize(), "B", 1) %></td>
</tr>
</table>
</%def>