MCPcopy Index your code
hub / github.com/nodejs/node / getCEntryProfile

Method getCEntryProfile

deps/v8/tools/profile.mjs:841–852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

839 }
840
841 getCEntryProfile() {
842 const result = [new CEntryNode("TOTAL", 0)];
843 let total_ticks = 0;
844 for (let f in this.c_entries_) {
845 const ticks = this.c_entries_[f];
846 total_ticks += ticks;
847 result.push(new CEntryNode(f, ticks));
848 }
849 result[0].ticks = total_ticks; // Sorting will keep this at index 0.
850 result.sort((n1, n2) => n2.ticks - n1.ticks || (n2.name < n1.name ? -1 : 1));
851 return result;
852 }
853
854
855 /**

Callers 1

printStatisticsMethod · 0.80

Calls 2

sortMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected