Skip to content

Commit 1e96289

Browse files
committed
Address code review
1 parent 1a86c1b commit 1e96289

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Lib/profiling/sampling/flamegraph.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ body {
228228
}
229229

230230
.thread-filter-wrapper {
231-
display: inline-flex;
231+
display: none;
232232
align-items: center;
233233
margin-left: 16px;
234234
background: white;

Lib/profiling/sampling/flamegraph.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,6 @@ function initThreadFilter(data) {
536536
const threadWrapper = document.querySelector('.thread-filter-wrapper');
537537

538538
if (!threadFilter || !data.threads) {
539-
// Hide thread filter if no thread data
540-
if (threadWrapper) {
541-
threadWrapper.style.display = 'none';
542-
}
543539
return;
544540
}
545541

@@ -555,9 +551,9 @@ function initThreadFilter(data) {
555551
threadFilter.appendChild(option);
556552
});
557553

558-
// Hide filter if only one thread or no threads
559-
if (threads.length <= 1 && threadWrapper) {
560-
threadWrapper.style.display = 'none';
554+
// Show filter if more than one thread
555+
if (threads.length > 1 && threadWrapper) {
556+
threadWrapper.style.display = 'inline-flex';
561557
}
562558
}
563559

Lib/profiling/sampling/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ def main():
754754
"--mode",
755755
choices=["wall", "cpu", "gil"],
756756
default="wall",
757-
help="Sampling mode: wall (all threads), cpu (only CPU-running threads), gil (only GIL-holding threads)",
757+
help="Sampling mode: wall (all threads), cpu (only CPU-running threads), gil (only GIL-holding threads) (default: wall)",
758758
)
759759

760760
# Output format selection

0 commit comments

Comments
 (0)