Load test counter samples

Last Update: 12/5/2016

api-version = 1.0

If you haven't already, look at the information on getting started with these APIs.

Get a list of counter samples

POST https://{account}.vsclt.VisualStudio.com/_apis/clt/testruns/{testrunId}/countersamples
{
    "count": 2,
    "value": [
        {
          "counterInstanceId": "Els~-1662214188",
          "fromInterval": 0,
          "toInterval": 5
        },
        {
          "counterInstanceId": "ApplicationInsights~0",
          "fromInterval": 0,
          "toInterval": 2
        }
    ]
}

Returns a list of counter samples that are collected by the load test run matching specified instance query filters.

Parameter Type Notes
URL
account string Visual Studio Team Services account.
testrunId string The test run identifier.
Request Body
fromInterval int The offset in seconds from start of the run from which samples are required. Default indicates the beginning.
toInterval int The offset in seconds from start of the run to which samples are required. Default indicates the end.

Sample request

POST https://fabrikam.vsclt.visualstudio.com/_apis/clt/testRuns/28fec23a-91f9-4983-8bc6-1d58cc1b79f1/CounterSamples
{
  "count": 2,
  "value": [
    {
      "counterInstanceId": "Els~-2020039322"
    },
    {
      "counterInstanceId": "Els~-1543222480"
    }
  ]
}

Sample response

Status code: 200
{
  "totalSamplesCount": 5,
  "maxBatchSize": 2000,
  "count": 2,
  "values": [
    {
      "counterInstanceId": "Els~-2020039322",
      "nextRefreshTime": "2014-06-23T06:27:05.417Z",
      "count": 2,
      "values": [
        {
          "counterInstanceId": "Els~-2020039322",
          "intervalNumber": 0,
          "intervalEndDate": "2014-06-23T06:25:35.417Z",
          "rawValue": 0,
          "baseValue": 0,
          "counterFrequency": 3312793,
          "systemFrequency": 3312793,
          "timeStamp": 0,
          "counterType": "AverageTimer32",
          "computedValue": 0.0
        },
        {
          "counterInstanceId": "Els~-2020039322",
          "intervalNumber": 1,
          "intervalEndDate": "2014-06-23T06:25:40.417Z",
          "rawValue": 0,
          "baseValue": 0,
          "counterFrequency": 3312793,
          "systemFrequency": 3312793,
          "timeStamp": 16563965,
          "counterType": "AverageTimer32",
          "computedValue": 0.0
        }
      ]
    },
    {
      "counterInstanceId": "Els~-1543222480",
      "nextRefreshTime": "2014-06-23T06:27:05.417Z",
      "count": 3,
      "values": [
        {
          "counterInstanceId": "Els~-1543222480",
          "intervalNumber": 0,
          "intervalEndDate": "2014-06-23T06:25:35.417Z",
          "rawValue": 0,
          "baseValue": 0,
          "counterFrequency": 3312793,
          "systemFrequency": 3312793,
          "timeStamp": 0,
          "counterType": "AverageTimer32",
          "computedValue": 0.0
        },
        {
          "counterInstanceId": "Els~-1543222480",
          "intervalNumber": 1,
          "intervalEndDate": "2014-06-23T06:25:40.417Z",
          "rawValue": 253147077,
          "baseValue": 25,
          "counterFrequency": 3312793,
          "systemFrequency": 3312793,
          "timeStamp": 16563965,
          "counterType": "AverageTimer32",
          "computedValue": 3.0566
        },
        {
          "counterInstanceId": "Els~-1543222480",
          "intervalNumber": 2,
          "intervalEndDate": "2014-06-23T06:25:45.417Z",
          "rawValue": 796156915,
          "baseValue": 65,
          "counterFrequency": 3312793,
          "systemFrequency": 3312793,
          "timeStamp": 33127930,
          "counterType": "AverageTimer32",
          "computedValue": 4.097825
        }
      ]
    }
  ]
}