Retrieve processing statistics for specified time period.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function cmdstats( _ ByVal cmd_names As String(), _ ByVal duration As Double, _ ByVal end_time As Double _ ) As NetricsCmdStats() |
C# |
---|
public NetricsCmdStats[] cmdstats( string[] cmd_names, double duration, double end_time ) |
C++ |
---|
public: array<NetricsCmdStats>^ cmdstats( array<String>^ cmd_names, double duration, double end_time ) sealed |
J# |
---|
public NetricsCmdStats[] cmdstats( string[] cmd_names, double duration, double end_time ) |
JScript |
---|
public
function cmdstats( cmd_names : String[], duration : double, end_time : double ) : NetricsCmdStats[] |
Parameters
- cmd_names
- The names of the commands to be included in the report. The class NetricsCmdStats has defines of all command names.
- duration
- The time period in seconds to be covered by this report. -1.0 can be used to indicate "forever".
- end_time
- The ending time for a report.
Return Value
An array of NetricsCmdStats objects, one per requested command.
Remarks
This reports statistics for the named commands ending at the given time going duration seconds into the past from that time. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The end time and duration are approximate. Each time a report request is made that does not request a specific end time a reporting tic-mark is made at that time. The start and end time for a report will be reset to the closest time tic-mark set by a previous report. (This implies the first report always includes the entire time span since the start of the server.) The normal procedure is to request reports at a fixed interval requesting durations in units of the request interval. E.g. request a report every 5 minutes covering a 15 minute period.
The end_time value is given in milliseconds from an arbitrary epic point, thus the only valid way to get an end_time value is to use a value returned by a previous report. So if you are requesting reports every 5 minutes and you want reports that cover the previous 5, 10, 15 minutes and the entire server time span the normal procedure would be something like:
![]() | |
---|---|
String [] cmd_list = new { NetricsCmdStats.CMD_ALL }; NetricsCmdStats []report_5 ; NetricsCmdStats []report_10 ; NetricsCmdStats []report_15 ; NetricsCmdStats []report_forever ; report_5 = si.cmdstats(cmd_list,60.0*5.0); double end_time = report_5[0].end_time(); report_10 = si.cmdstats(cmd_list,60.0*10.0,end_time); report_15 = si.cmdstats(cmd_list,60.0*15.0,end_time); report_forever = si.cmdstats(cmd_list,-1.0,end_time); |