Get the Perforce counters for this repository.
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public IList<Counter> GetCounters( Options options ) |
Visual Basic |
---|
Public Function GetCounters ( _ options As Options _ ) As IList(Of Counter) |
Visual C++ |
---|
public: IList<Counter^>^ GetCounters( Options^ options ) |
Parameters
- options
- Type: Perforce.P4..::..Options
Return Value
Remarks
p4 help counters
counters -- Display list of known counters
p4 counters [-e nameFilter -m max]
Lists the counters in use by the server. The server
uses the following counters directly:
change Current change number
job Current job number
journal Current journal number
lastCheckpointAction Data about the last complete checkpoint
logger Event log index used by 'p4 logger'
traits Internal trait lot number used by 'p4 attribute'
upgrade Server database upgrade level
The -e nameFilter flag lists counters with a name that matches
the nameFilter pattern, for example: -e 'mycounter-*'.
The -m max flag limits the output to the first 'max' counters.
The names 'minClient', 'minClientMessage', 'monitor',
'security', and 'unicode' are reserved names: do not use them
as ordinary counters.
For general-purpose server configuration, see 'p4 help configure'.
Examples
To get the counters on the server:
CopyC#
To get the counters on the server that start with the name "build_":
CopyC#

IList<Counter> target = Repository.GetCounters(null);

Options opts = new Options(); opts["-e"] = "build_*"; IList<Counter> target = Repository.GetCounters(opts);