MCPcopy Create free account
hub / github.com/nodejs/node / push

Method push

deps/v8/tools/system-analyzer/timeline.mjs:86–104  ·  view source on GitHub ↗

@param {T} event

(event)

Source from the content-addressed store, hash-verified

84
85 /** @param {T} event */
86 push(event) {
87 let time = event.time;
88 if (!this.isEmpty() && this.last().time > time) {
89 // Invalid insertion order, might happen without --single-process,
90 // finding insertion point.
91 let insertionPoint = this.find(time);
92 this._values.splice(insertionPoint, event);
93 } else {
94 this._values.push(event);
95 }
96 if (time > 0) {
97 this.endTime = Math.max(this.endTime, time);
98 if (this.startTime === 0) {
99 this.startTime = time;
100 } else {
101 this.startTime = Math.min(this.startTime, time);
102 }
103 }
104 }
105
106 /** @returns {T} */
107 at(index) {

Callers 15

escapeFieldMethod · 0.45
parseLineMethod · 0.45
printUsageAndExitMethod · 0.45
profile_view.mjsFile · 0.45
_parseMapFunction · 0.45
constructorMethod · 0.45
loadSymbolsMethod · 0.45
processLogLineMethod · 0.45
processStackMethod · 0.45
addEntryMethod · 0.45
addSourcePositionMethod · 0.45

Calls 5

isEmptyMethod · 0.95
lastMethod · 0.95
findMethod · 0.95
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected