demo D213
Fleet and network in ESM
Address, data-size and rate types, latency long-tailed so p99 bites
type: ipv4 · bytes · bitrate
This is a fleet and network sheet with address, data-size and rate types, and latency that is long-tailed so the p99 really bites. It shows infrastructure metrics with the right types and the tail statistic that matters for reliability.
This is the ES module version. The grid is imported straight from a CDN as a module, the same configuration as the vanilla tab without a global script tag, so it drops into any bundler or a bare module script.
The configuration
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.71.0/lattice-grid.min.css">
<div id="grid" style="height: 480px"></div>
<script type="module">
import { createGrid } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.71.0/lattice-grid.esm.min.js';
const grid = createGrid(document.getElementById('grid'), {
rowKey: 'id',
columnDefaults: { filter: true },
toolPanel: { side: 'left', panels: ['columns', 'filters', 'statistics'] },
columns: [
{ field: 'host', title: 'Host', layout: { pin: 'start', width: 140 } },
{ field: 'rack', title: 'Rack', filter: { type: 'set' } },
// ipv4 sorts in address order, so .9 comes before .10. Latency is
// long-tailed, so p99 reads far from the median.
{ field: 'address', title: 'Address', type: 'ipv4' },
{ field: 'disk', title: 'Disk', type: 'bytes', total: 'sum' },
{ field: 'link', title: 'Link', type: 'bitrate', total: 'sum' },
{ field: 'latency', title: 'Latency', type: 'milliseconds', total: 'p99' },
{ field: 'cpu', title: 'CPU', type: 'percentRate', total: 'avg' },
{ field: 'draw', title: 'Power', type: 'kilowatts', total: 'sum' },
],
formatting: {
latency: [
{ id: 'l-top', when: { op: 'topPercent', value: 5 }, style: { background: '#fbeceb' } },
{ id: 'l-med', when: { op: 'aboveMedian' }, style: { color: '#a4262c' } },
],
},
rows, // hosts: host, rack, address, disk, link, latency, cpu, draw
});
</script>