Update README.md

This commit is contained in:
devfirefly 2015-11-09 16:54:44 +00:00
parent 827f9349ab
commit aed4228649

View File

@ -48,46 +48,62 @@ 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 these:
Modes available:
```lua
reset
increase_depth
decrease_depth
increase_step_size
decrease_step_size
shorten_names
show_hidden
save_to_file
```
To redefine only one of the keys: To redefine only one of the keys:
```lua
piefiller:setKey(mode,key) ```lua
``` piefiller:setKey(mode,key)
example: ```
```lua
piefiller:setKey("increase_depth","up") example:
```
```lua
piefiller:setKey("increase_depth","up")
```
To redefine all of the keys: To redefine all of the keys:
```lua ```lua
table = { table = {
"increase_depth" = "up" "increase_depth" = "up"
} }
piefiller:setKey(table) piefiller:setKey(table)
``` ```
# For your own interpretation # For your own interpretation
If you wish to interpret the data on your own use piefiller:unpack(). If you wish to interpret the data on your own use piefiller:unpack().
Output is a table as such: Output is a table as such:
```lua
local data = { ```lua
items = { data = {
{ items = {
name, {
line_defined, name,
current_line, line_defined,
source, current_line,
time_taken, source,
percentage, time_taken,
caller, percentage,
} caller,
}, }
about = { },
depth, about = {
step, depth,
totalTime, 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.