All Projects → leinlin → Miku Luaprofiler

leinlin / Miku Luaprofiler

Licence: apache-2.0

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Miku Luaprofiler

Unityheapexplorer
A Memory Profiler, Debugger and Analyzer for Unity 2019.3 and newer.
Stars: ✭ 179 (-84.09%)
Mutual labels:  unity, profiler
Devel Nytprof
Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
Stars: ✭ 61 (-94.58%)
Mutual labels:  profiler
Unity3d Ai And Procedural Generation Framework
Unity3D AI and Procedural Generation Framework.
Stars: ✭ 58 (-94.84%)
Mutual labels:  unity
Erbium
🤺Third Person Character Controller for unity🤺
Stars: ✭ 61 (-94.58%)
Mutual labels:  unity
Escapefromtarkov Trainer
Escape from Tarkov Trainer
Stars: ✭ 59 (-94.76%)
Mutual labels:  unity
Diodon
Aiming to be the best integrated clipboard manager for the Gnome/Unity desktop
Stars: ✭ 60 (-94.67%)
Mutual labels:  unity
Chromium Unity Server
Embedded web browser for Unity games, based on Chromium Embedded Framework (CEF)
Stars: ✭ 58 (-94.84%)
Mutual labels:  unity
Unity Scene Query
A library to traverse and query the Unity scene to find particular objects, uses something similar to CSS selectors to identify game objects.
Stars: ✭ 63 (-94.4%)
Mutual labels:  unity
Ksframework
QQ Group:538722494,KSFramework = KEngine + SLua(or xLua) , Unity3D Framework/Toolsets focus on hot reload
Stars: ✭ 1,119 (-0.53%)
Mutual labels:  unity
Unitysapi
init
Stars: ✭ 60 (-94.67%)
Mutual labels:  unity
Brunetons Ocean
Brunetons ocean in Unity
Stars: ✭ 60 (-94.67%)
Mutual labels:  unity
Unityiphonexsupport
Support iPhoneX by changing the drawing area of Unity.
Stars: ✭ 59 (-94.76%)
Mutual labels:  unity
Unity Hierarchy Folders
Specialized folder objects for Unity Hierarchy.
Stars: ✭ 62 (-94.49%)
Mutual labels:  unity
Hooking Template With Mod Menu
A small template for Android Hooking with Substrate. (Includes a mod menu written in Java)
Stars: ✭ 59 (-94.76%)
Mutual labels:  unity
Udllexporter
Tool to build DLLs in Unity.
Stars: ✭ 63 (-94.4%)
Mutual labels:  unity
Hoshiyukitoonshader
GI&HDR based toon shader for Unity.
Stars: ✭ 58 (-94.84%)
Mutual labels:  unity
Phpspy
Low-overhead sampling profiler for PHP 7+
Stars: ✭ 1,105 (-1.78%)
Mutual labels:  profiler
Vcprofiler
An accurate and simple tool uses KVO to measure the time cost of every view controller.
Stars: ✭ 61 (-94.58%)
Mutual labels:  profiler
Awesome Unity Open Source On Github
A categorized collection of awesome Unity open source on GitHub (800+)
Stars: ✭ 1,124 (-0.09%)
Mutual labels:  unity
Numix Gtk Theme
A modern flat theme with a combination of light and dark elements.
Stars: ✭ 1,122 (-0.27%)
Mutual labels:  unity

Lua Profiler For Unity

支持情况

目前只支持Windows下,Unity5.6版本以上的编辑器进行使用,支持市场上所有版本的lua,包括各种魔改。

部署和安装

直接将example下的LuaProfiler文件夹拷贝到工程目录下。

使用说明

在Windows菜单下也有个LuaProfiler选项,点击后即可打开窗口。开启DeepLua,运行游戏就能看到对应的数据。

数据说明

Name Descriptions
Overview 函数名称
totalLuaMemory 此函数生成的所有Lua GC的总和
self 函数本身产生的GC量
totalMonoMemory 此函数生成的所有Mono GC的总和
self 函数本身产生的GC量
currentTime 函数在当前帧中运行所需的时间
averageTime 计算在函数上花费的时间的平均值
totalTime 此功能消耗的所有时间
LuaGC 由当前帧生成的Lua GC
MonoGC 由当前帧生成的Mono GC
totalCalls 游戏开始后此功能的运行次数
Calls 函数当前帧的执行次数

FAQ

运行起来后totalLuaMemory为负数

底层统计lua内存申请采用记录lua虚拟机总量来记录对应的GC,如果函数运行的中间发生了GC就会导致内存差值为负数,你可以把自动GC关闭掉后进行统计。

如何对Lua函数进行各种数据排序

在搜索框中输入:[lua],然后点击右上角的merge按钮,最后点击各个数据标签进行排序

如何定位Lua函数内存暴涨的点

使用Record模式启动游戏,在想采样的地方点击StartRecord,截取完记录后,找一段明显内存上涨的地方,采样出来分析函数即可.(鼠标点击上去,然后按键盘的左右键)

ref的function代表什么

这里存储的一般都是C#这里持有的回调函数,你可以每一次打开UI前先clear数据,然后进入UI后记录数据,释放UI后如果 还持有不少委托,就代表说泄漏了。

MarkStaticRecord、MarkLuaRecord、DiffRecord、ClearDiff有什么用

这一组功能是查泄漏使用的。举一个例子,你可以在打开UI前MarkStaticRecord,进行一次内存快照,然后打开UI后MarkLuaRecord,记录第二次快照,最后你在调用UI释放的函数这里DiffRecord。如果打开UI前不持有,而打开UI后 与释放UI后都持有的对象为泄漏。 函数API为:

function miku_do_record(val, prefix, key, record, history, null_list, staticRecord)

function miku_diff(record, staticRecord)

DeepMoono、Discard Invalid、Precompile Lua选项有什么用

DeepMoono:如果你的代码大部分在Assembly-CSharp.dll里面的话,你可以开启DeepMono,这时候将把C#、Lua整个相互调用都显示出来。 Discard Invalid:因为记录的压力实在太大了,所以就把一些没有内存消耗,然后耗时较低的函数排除掉了。 Precompile Lua:有的人实在跑不起来我这套东西,你可以用Tools里面的LuaInject.exe处理一下你的lua代码,使用起来也简单,copy到你的lua文件夹下双击运行一下,对应的代码就插入好了

目前暂时放弃了真机调试,想真机调试的可以去master版本试试看,xlua的项目没有什么大问题

联系

如果您发现任何错误或有任何建议加入QQ群:882425563 与我们联系

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].