GetPerformanceStats: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function returns performance information. ==Syntax== <syntaxhighlight lang="lua"> table columns, table rows = getPerformanceStats(string category, strin...")
 
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 5: Line 5:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
table columns, table rows = getPerformanceStats(string category, string options = "", string filter = "")
table table getPerformanceStats ( string category [, string options = "", string filter = "" ] )
</syntaxhighlight>
</syntaxhighlight>


===Required Arguments===
===Required Arguments===
*'''category:''' Performance statistics category. If empty string is given, list of all categories is returned.
*'''category:''' Performance statistics category. If empty string is given, list of all categories is returned.See [[categories]] for more information.


===Optional Arguments===  
===Optional Arguments===  
*'''options:''' Category specific ',' separated options. All categories supports 'h' option for help.
*'''options:''' Category specific ',' separated options. All categories supports 'h' option for help.
*'''filer:''' Case-sensitive filter used to select returned rows. Only 'name' column is filtered.
*'''filter:''' Case-sensitive filter used to select returned rows. Only 'name' column is filtered.


===Returns===
===Returns===

Latest revision as of 22:02, 9 January 2018

This function returns performance information.

Syntax

table table getPerformanceStats ( string category [, string options = "", string filter = "" ] )

Required Arguments

  • category: Performance statistics category. If empty string is given, list of all categories is returned.See categories for more information.

Optional Arguments

  • options: Category specific ',' separated options. All categories supports 'h' option for help.
  • filter: Case-sensitive filter used to select returned rows. Only 'name' column is filtered.

Returns

Returns two tables. First contains column names. The second contains result rows. Each row is table of cells.

Example

local columns, rows = getPerformanceStats("")
outputChatBox(table.concat(columns, "  "))
outputChatBox("----------------")
for i, row in ipairs(rows) do
  outputChatBox(table.concat(row, "  "))
end

See Also