mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-10-06 15:17:07 +03:00
Merge 77dfa69d91
into 0121cf9342
This commit is contained in:
commit
ccff6544e5
@ -494,13 +494,10 @@ export class StackListProfileBuilder extends Profile {
|
||||
}
|
||||
|
||||
appendSampleWithWeight(stack: FrameInfo[], weight: number) {
|
||||
if (weight === 0) {
|
||||
// Samples with zero weight have no effect, so let's ignore them
|
||||
if (weight === 0 || weight < 0) {
|
||||
// Samples with zero or negative weight have no effect, so let's ignore them
|
||||
return
|
||||
}
|
||||
if (weight < 0) {
|
||||
throw new Error('Samples must have positive weights')
|
||||
}
|
||||
|
||||
const frames = stack.map(fr => Frame.getOrInsert(this.frames, fr))
|
||||
this._appendSample(frames, weight, true)
|
||||
|
Loading…
Reference in New Issue
Block a user