MCPcopy Create free account
hub / github.com/google/pprof / nodeId

Function nodeId

internal/driver/html/common.js:515–523  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

513 }
514
515 function nodeId(elem) {
516 const id = elem.id;
517 if (!id) return -1;
518 if (!id.startsWith('node')) return -1;
519 const n = parseInt(id.slice(4), 10);
520 if (isNaN(n)) return -1;
521 if (n < 0 || n >= nodes.length) return -1;
522 return n;
523 }
524
525 // Change highlighting of node (returns true if node was found).
526 function setNodeHighlight(n, set) {

Callers 1

toggleSvgSelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…