Skip to content

Commit 703e34a

Browse files
committed
Skip the work for all-zero-CPU samples.
1 parent 0526506 commit 703e34a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/shared/thread/ActivityGraphFills.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ export class ActivityGraphFillComputer {
311311
for (let i = 0; i < samples.length; i++) {
312312
const halfwayPositionAfter = halfwayPositions[i + 1];
313313
const afterSampleCpuPercent = threadCPUPercent[i + 1];
314+
315+
if (beforeSampleCpuPercent === 0 && afterSampleCpuPercent === 0) {
316+
halfwayPositionBefore = halfwayPositionAfter;
317+
beforeSampleCpuPercent = afterSampleCpuPercent;
318+
continue;
319+
}
320+
314321
const category = samples.category[i];
315322

316323
const bufferIndex =

0 commit comments

Comments
 (0)