File tree Expand file tree Collapse file tree
Lib/profiling/sampling/_flamegraph_assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -317,7 +317,8 @@ function createPythonTooltip(data) {
317317 const selfSamples = d . data . self || 0 ;
318318 const selfMs = ( selfSamples / 1000 ) . toFixed ( 2 ) ;
319319 const percentage = ( ( d . data . value / data . value ) * 100 ) . toFixed ( 2 ) ;
320- const relativePercentage = Math . max ( 100 , ( ( d . data . value / ( zoomedNodeValue ?? data . value ) ) * 100 ) ) . toFixed ( 2 ) ;
320+ const relativePercentage = zoomedNodeValue && zoomedNodeValue !== data . value ?
321+ ( d . data . value / zoomedNodeValue * 100 ) . toFixed ( 2 ) : undefined ;
321322 const calls = d . data . calls || 0 ;
322323 const childCount = d . children ? d . children . length : 0 ;
323324 const source = d . data . source ;
@@ -441,8 +442,8 @@ function createPythonTooltip(data) {
441442 <span class="tooltip-stat-label">Percentage:</span>
442443 <span class="tooltip-stat-value accent">${ percentage } %</span>
443444
444- ${ relativePercentage !== percentage && relativePercentage !== "100.00" ? `
445- <span class="tooltip-stat-label">% of Selection :</span>
445+ ${ relativePercentage ? `
446+ <span class="tooltip-stat-label">Relative Percentage :</span>
446447 <span class="tooltip-stat-value accent">${ relativePercentage } %</span>
447448 ` : '' }
448449
You can’t perform that action at this time.
0 commit comments