设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker MV 讨论区 › Power console performance Debug: Power console performance Debug-3.jpg

Power console performance Debug: Power console performance Debug-3.jpg

 

Power console performance Debug:





    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/
Power console performance Debug: Power console performance Debug-3.jpg
         同一主题附件:
    Power console performance Debug-1.jpg
    Power console performance Debug-2.jpg
    Power console performance Debug-3.jpg
简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)
关闭

幸运抽奖

社区每日抽奖来袭,快来试试你是欧皇还是非酋~

立即查看

Loading...

QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

GMT+8, 2026-10-4 05:25 , Processed in 0.088542 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部