Profiling end timestamp in microseconds.
The list of profile nodes. First item is the root node.
Ids of samples top nodes.
Profiling start timestamp in microseconds.
Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
Follows Chrome DevTools cpuprofile format. See Chrome DevTools protocol docs for more details.
In order to analyze resulting Profile - serialize this class as JSON and put to a .cpuprofile file. It will be available to use in DevTools on "Performance" tab, or in Visual Studio Code.
// server alt.onClient("saveProfile", (player, name, content) => { fs.writeFileSync("./" + name + ".cpuprofile", content); }); // client alt.Profile.startProfiling("test"); // do some stuff const profile = alt.Profile.stopProfiling("test"); const content = JSON.stringify(profile); alt.emitServer("saveProfile", "test", content);