Performance Data Returned by a vSphere Server

The query methods return sampling information and performance data. The sampling information indicates the collection interval in seconds and the time that the data was collected. When you call performance query methods, you pass in query specifications (PerfQuerySpec) to identify the performance data to be retrieved. To indicate the format of the output data, specify either "normal" or "csv" for the PerfQuerySpec.format property.

The query methods return PerfEntityMetricBase objects which you must cast into the appropriate type that corresponds to the PerfQuerySpec.format value specified in the call to the method.

  • The QueryPerf method returns a list of PerfEntityMetricBase objects.
  • The QueryPerfComposite method returns a PerfCompositeMetric object, which contains PerfEntityMetricBase objects.

Normal Output Format

When you specify "normal" format, you must cast the returned PerfEntityMetricBase objects into PerfEntityMetric objects. Each PerfEntityMetric object contains the following properties:

  • entity – Reference to the performance provider.
  • sampleInfo – Array of sample information (PerfSampleInfo data objects), encoded as xsd:int and xsd:dateTime values.
  • value – Array of data values (PerfMetricIntSeries data objects). Each object in the array contains the following properties:
    • id – Performance metric ID that identifies the counter instance.
    • value – Array of integers that corresponds to the array of sample information (PerfEntityMetric.sampleInfo).

The following figure shows a representation of the data object hierarchy returned by the query methods for normal format.

Figure 1. PerfEntityMetric Object Hierarchy
Shows objects under Performance Entity Metric.

CSV Output Format

When you specify "csv" format, you must cast the returned PerfEntityMetricBase objects into PerfEntityMetricCSV objects. Both the sampling information and the collected data are encoded as comma-separated values suitable for display in tabular format.

The PerfEntityMetricCSV object contains the following properties:

  • entity – Reference to the performance provider.
  • sampleInfoCSV – String containing a set of interval and date-time values. The property contains string representations of PerfSampleInfo xsd:int and xsd:dateTime values. The string values are encoded in the following CSV format:

    interval1, date1, interval2, date2

  • value – Array of data values (PerfMetricSeriesCSV data objects). Each object in the array contains the following properties:
    • id – Performance metric ID that identifies the counter instance.
    • value – Set of sample values in CSV format, corresponding to the list of sample information (PerfEntityMetricCSV.sampleInfoCSV).

The following figure shows a representation of the data object hierarchy returned by the query methods for CSV format.

Figure 2. PerfEntityMetricCSV Object Hierarchy
Diagram shows data structures returned for CSV metrics.