mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-138122: Small fixes to the new tachyon UI (#142157)
This commit is contained in:
parent
f87eb4d7cd
commit
e32c975640
2 changed files with 4 additions and 2 deletions
|
|
@ -633,7 +633,9 @@ function populateThreadStats(data, selectedThreadId = null) {
|
|||
if (gilHeldPctElem) gilHeldPctElem.textContent = `${(threadStats.has_gil_pct || 0).toFixed(1)}%`;
|
||||
|
||||
const gilReleasedPctElem = document.getElementById('gil-released-pct');
|
||||
if (gilReleasedPctElem) gilReleasedPctElem.textContent = `${(threadStats.on_cpu_pct || 0).toFixed(1)}%`;
|
||||
// GIL Released = not holding GIL and not waiting for it
|
||||
const gilReleasedPct = Math.max(0, 100 - (threadStats.has_gil_pct || 0) - (threadStats.gil_requested_pct || 0));
|
||||
if (gilReleasedPctElem) gilReleasedPctElem.textContent = `${gilReleasedPct.toFixed(1)}%`;
|
||||
|
||||
const gilWaitingPctElem = document.getElementById('gil-waiting-pct');
|
||||
if (gilWaitingPctElem) gilWaitingPctElem.textContent = `${(threadStats.gil_requested_pct || 0).toFixed(1)}%`;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ <h3 class="section-title">Runtime Stats</h3>
|
|||
</div>
|
||||
<div class="stat-tile stat-tile--yellow" id="gil-waiting-stat">
|
||||
<div class="stat-tile-value" id="gil-waiting-pct">--</div>
|
||||
<div class="stat-tile-label">Waiting</div>
|
||||
<div class="stat-tile-label">Waiting GIL</div>
|
||||
</div>
|
||||
<div class="stat-tile stat-tile--purple" id="gc-stat">
|
||||
<div class="stat-tile-value" id="gc-pct">--</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue