Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const start = new Date();
- const totalIterations = 30,
- records = xelib.GetRecords(0, 'WEAP,ARMO,MISC'),
- numCalls = totalIterations * records.length;
- console.log(`Calling xelib.FullName ${numCalls} times...`);
- for (let i = 0; i < totalIterations; i++) {
- for (let rec of records) {
- xelib.FullName(rec);
- }
- }
- const duration = new Date() - start;
- console.log(`Completed in ${duration}ms`);
- const timePerCall = (duration / numCalls) * 1000;
- console.log(`${timePerCall.toFixed(1)}μs per call`);
Add Comment
Please, Sign In to add comment