Skip to content

Commit 0421fe7

Browse files
committed
Skip the work for all-zero-CPU samples.
1 parent adc95bd commit 0421fe7

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
@@ -315,6 +315,13 @@ export class ActivityGraphFillComputer {
315315
// at the end, so accessing [i + 1] is valid even for the last sample.
316316
const halfwayPositionAfter = halfwayPositions[i + 1];
317317
const afterSampleCpuPercent = threadCPUPercent[i + 1];
318+
319+
if (beforeSampleCpuPercent === 0 && afterSampleCpuPercent === 0) {
320+
halfwayPositionBefore = halfwayPositionAfter;
321+
beforeSampleCpuPercent = afterSampleCpuPercent;
322+
continue;
323+
}
324+
318325
const category = samples.category[i];
319326

320327
const bufferIndex =

0 commit comments

Comments
 (0)