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

Function updater

internal/driver/html/common.js:588–609  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

586 elem.addEventListener('touchstart', updater);
587
588 function updater() {
589 // The selection can be in one of two modes: regexp-based or
590 // list-based. Construct regular expression depending on mode.
591 let re = regexpActive
592 ? search.value
593 : Array.from(getSelection().keys()).map(key => pprofQuoteMeta(nodes[key])).join('|');
594
595 setHrefParams(elem, function (params) {
596 if (re != '') {
597 // For focus/show/show-from, forget old parameter. For others, add to re.
598 if (param != 'f' && param != 's' && param != 'sf' && params.has(param)) {
599 const old = params.get(param);
600 if (old != '') {
601 re += '|' + old;
602 }
603 }
604 params.set(param, re);
605 } else {
606 params.delete(param);
607 }
608 });
609 }
610 }
611
612 function setHrefParams(elem, paramSetter) {

Callers

nothing calls this directly

Calls 5

getSelectionFunction · 0.85
pprofQuoteMetaFunction · 0.85
setHrefParamsFunction · 0.85
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…