MCPcopy Index your code
hub / github.com/python/cpython / setupElidedToggle

Function setupElidedToggle

Lib/profiling/sampling/_flamegraph_assets/flamegraph.js:987–1008  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

985let isShowingElided = false;
986
987function setupElidedToggle(data) {
988 const stats = data.stats || {};
989 const elidedCount = stats.elided_count || 0;
990 const elidedFlamegraph = stats.elided_flamegraph;
991
992 if (!elidedCount || !elidedFlamegraph) {
993 return;
994 }
995
996 elidedFlamegraphData = resolveStringIndices(elidedFlamegraph, elidedFlamegraph.strings);
997
998 const toggleElided = document.getElementById('toggle-elided');
999 if (toggleElided) {
1000 toggleElided.style.display = 'flex';
1001
1002 toggleElided.onclick = function() {
1003 isShowingElided = !isShowingElided;
1004 updateToggleUI('toggle-elided', isShowingElided);
1005 updateFlamegraphView();
1006 };
1007 }
1008}
1009
1010// ============================================================================
1011// Hotspot Stats

Callers 1

populateStatsFunction · 0.85

Calls 4

resolveStringIndicesFunction · 0.85
updateToggleUIFunction · 0.85
updateFlamegraphViewFunction · 0.85
getElementByIdMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…