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

Function applyLineColors

Lib/profiling/sampling/_heatmap_assets/heatmap.js:187–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185}
186
187function applyLineColors() {
188 const lines = document.querySelectorAll('.code-line');
189 lines.forEach(line => {
190 let intensity;
191 if (colorMode === 'self') {
192 intensity = parseFloat(line.getAttribute('data-self-intensity')) || 0;
193 } else {
194 intensity = parseFloat(line.getAttribute('data-cumulative-intensity')) || 0;
195 }
196
197 const color = intensityToColor(intensity);
198 line.style.background = color;
199 });
200}
201
202// ============================================================================
203// Toggle Controls

Callers 4

toggleThemeFunction · 0.85
toggleColorModeFunction · 0.85
heatmap.jsFile · 0.85
toggleSpecViewFunction · 0.85

Calls 2

intensityToColorFunction · 0.85
getAttributeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…