ren19890419 / lmprof Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pmusa/lmprof
Lua Memory Profiler (lmprof)
License: Other
This project forked from pmusa/lmprof
Lua Memory Profiler (lmprof)
License: Other
lmprof ============== A Memory Profiler for the Lua language * Author: Pablo Musa * Creation Date: may 21 2014 * Last Modification: aug 18 2014 * See Copyright Notice in LICENSE lmprof is a library for the Lua language (version 5.2 or higher) that collects information about the memory usage of a program throughout its execution and then analyze the collected data to generate reports. The memory use of the program using our library can be seen in a flat or in call-graph profile. Read INSTALL to see the library dependencies. Use the following command to load the library into a local variable: local lmprof = require"lmprof" * * lmprof monitor API * -- starts the memory monitor and write to a file in Lua table format the number -- of calls, the memory allocated only by the function and the memory allocated -- by the function and its children for all the pairs (function, parent) that -- allocated memory. -- can be used without stop to monitor the full execution. -- if start is used in a "inner function level" (ex: inside a function call) -- there must be a stop in the same function level. -- if no filename is passed the output is written to "lmprof_default_output.lua" lmprof.start([output_file_name]) -- stops the memory monitor and output to a file in Lua table format. -- passing a filename in this call overwrites the filename passed to start. -- as said before, stop must be used in the same function level as start. lmprof.stop([output_file_name]) * * lmprof reduce * To see the report of the monitored program there are a few options. $> lua text.lua <flat | call | all> <lmprof_output_file_location> [size] flat profile: A summary of function allocations ordered by the amount of data allocated by each function alone. call-graph profile: A detailed report by function with parents and children information. all: both of the above profiles The optional size parameter limits the number of functions of the output. * * Some Considerations * Calling the start function twice raises an error. The library monitors only the interval between start and stop. Memory operations done before the start call, or after the stop call are not counted. If you call start in the main script execution, you do not need to call stop. For multiple-states, one should explicity indicate different files, otherwise the output of the last state will overwritte the others.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.