This plugin is for intermediate level and those who want to get performance index on their event, their common event or their plugin
How to Use script call- to start, add this line anywhere console.time('mytest')- to end, add this line anywhere console.timeEnd('mytest');- you need to have the rmmv console.log open in background [F8]
- you can use anywhere, and use different name to calculate Subfunction or event or other call
- 1000.000 ms ≈1F in rmmv
- after decimal is in 10-6 seconds, µs (1/100000 second)
Compatible scenario
Event and common event
*you can get the ms of a complete event, with multi instance. ex: event run multi CommonEvent
you will get the time performance after all common event will executed.
Spoiler
when event with instance Commonevent will end you will get
Spoiler
You can use it very easy and fast in a multiple context
*Function or inside your plugin
ex:
Spoiler//code stuff
function myFunction(p1, p2) {
console.time("my factorial test") // start check myFunction performance
//stuff here and test some Methods
console.timeEnd("my factorial test"); // get the performance of myFunction
}
*Other example you want check if your code are faster than another one
try copy this in your console debug
Spoilerconsole.time("time for the for in"); // start the for
x = [];
for( var i in $gameParty._items ) {
x.push([i,$gameParty._items
]);
}
console.timeEnd("time for the for in"); // end the for
//easy to test in the rmmv console debug
// you will get example 0.054ms , so exaqmple this 054 microsecond µs
Credit and Thanks- no need
Terms
M.I.T
Download
v 1.0 : ConsolePerf.js
you have suggest or issue, your welcome.
本贴来自国际rpgmaker官方论坛作者:Jonforum处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/power-console-performance-debug.73344/