MCPcopy Create free account
hub / github.com/microsoft/Webwright / toBarRows

Function toBarRows

assets/compare_trajectory/app.js:117–125  ·  view source on GitHub ↗
(rows, limit = 6)

Source from the content-addressed store, hash-verified

115}
116
117function toBarRows(rows, limit = 6) {
118 const subset = rows.slice(0, limit);
119 const max = subset.reduce((value, row) => Math.max(value, row.value), 0) || 1;
120 return subset.map((row) => ({
121 label: row.label,
122 value: row.value,
123 width: Math.max(8, Math.round((row.value / max) * 100))
124 }));
125}
126
127function tokenRowsFromTotals(tokens) {
128 if (!tokens) {

Callers 5

finalizeTraceFunction · 0.85
normalizeCodexFunction · 0.85
normalizeRawResponsesFunction · 0.85
enrichTraceTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected