mirror of
https://github.com/TangentFoxy/Piefiller.git
synced 2024-11-19 17:14:23 +00:00
added documentation to read me.
This commit is contained in:
parent
fa55cd6764
commit
827f9349ab
41
README.md
41
README.md
@ -47,6 +47,47 @@ s = shortens the names displayed
|
|||||||
c = hides/shows hidden processes
|
c = hides/shows hidden processes
|
||||||
|
|
||||||
p = saves to file called "Profile" and opens directory for you
|
p = saves to file called "Profile" and opens directory for you
|
||||||
|
## To redefine these:
|
||||||
|
To redefine only one of the keys:
|
||||||
|
```lua
|
||||||
|
piefiller:setKey(mode,key)
|
||||||
|
```
|
||||||
|
example:
|
||||||
|
```lua
|
||||||
|
piefiller:setKey("increase_depth","up")
|
||||||
|
```
|
||||||
|
To redefine all of the keys:
|
||||||
|
```lua
|
||||||
|
|
||||||
|
table = {
|
||||||
|
"increase_depth" = "up"
|
||||||
|
}
|
||||||
|
piefiller:setKey(table)
|
||||||
|
|
||||||
|
```
|
||||||
|
# For your own interpretation
|
||||||
|
If you wish to interpret the data on your own use piefiller:unpack().
|
||||||
|
Output is a table as such:
|
||||||
|
```lua
|
||||||
|
local data = {
|
||||||
|
items = {
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
line_defined,
|
||||||
|
current_line,
|
||||||
|
source,
|
||||||
|
time_taken,
|
||||||
|
percentage,
|
||||||
|
caller,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
about = {
|
||||||
|
depth,
|
||||||
|
step,
|
||||||
|
totalTime,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
# Additional notes
|
# Additional notes
|
||||||
The best depth to search for is 2 and 3.
|
The best depth to search for is 2 and 3.
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@ end
|
|||||||
function piefiller:setKey(table_or_mode,key)
|
function piefiller:setKey(table_or_mode,key)
|
||||||
if type(table_or_mode) == "table" then
|
if type(table_or_mode) == "table" then
|
||||||
self.keys = table_or_mode
|
self.keys = table_or_mode
|
||||||
|
for i,v in pairs(table_or_mode) do
|
||||||
|
if self.keys[i] then self.keys[i] = v end
|
||||||
|
end
|
||||||
elseif type(table_or_mode) == "string" then
|
elseif type(table_or_mode) == "string" then
|
||||||
if not self.keys[table_or_mode] then error("Invalid mode: "..tostring(table_or_mode)) end
|
if not self.keys[table_or_mode] then error("Invalid mode: "..tostring(table_or_mode)) end
|
||||||
self.keys[table_or_mode] = key
|
self.keys[table_or_mode] = key
|
||||||
@ -359,7 +362,7 @@ function piefiller:unpack(fn)
|
|||||||
current_line = v.cur,
|
current_line = v.cur,
|
||||||
source = v.src,
|
source = v.src,
|
||||||
time_taken = v.time,
|
time_taken = v.time,
|
||||||
precentage = v.prc,
|
percentage = v.prc,
|
||||||
caller = v.caller,
|
caller = v.caller,
|
||||||
}
|
}
|
||||||
if fn then
|
if fn then
|
||||||
|
Loading…
Reference in New Issue
Block a user