# getRecentPerformanceSamples

> Returns recent per-sample-period throughput statistics for the cluster.

Source: https://docs.constant-k.com/rpc/http/getrecentperformancesamples/

`getRecentPerformanceSamples` returns historical samples, each covering roughly 60 seconds, with the slots and transactions processed in that window. TPS is `numTransactions / samplePeriodSecs`.

Samples are newest-first and pre-aggregated by the node, cheaper than deriving throughput from individual blocks.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Slots & Epochs
- Availability: All plans
- Rate limits: Free 5/s · Operator 50/s · Blade Runner 200/s · Nexus 500/s

## Parameters

`params` is a positional JSON array, in this order:

- `limit` (integer, optional, min 1, max 720): Number of samples to return, newest first. Defaults to the node's maximum retained sample count.

## Result

- `result` (object[], optional): Performance samples, newest first.
  - `slot` (integer, required): Last slot included in this sample.
  - `numTransactions` (integer, required): Total transactions processed during the sample period (includes vote transactions).
  - `numNonVoteTransactions` (integer, optional): Transactions processed during the sample period, excluding vote transactions — usually the more meaningful throughput figure.
  - `numSlots` (integer, required): Number of slots covered by the sample period.
  - `samplePeriodSecs` (integer, required): Length of the sample period, in seconds.

## Example: Get the last 3 performance samples

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getRecentPerformanceSamples",
    "params": [3]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "numNonVoteTransactions": 113955,
      "numSlots": 192,
      "numTransactions": 240405,
      "samplePeriodSecs": 60,
      "slot": 447946594
    },
    {
      "numNonVoteTransactions": 124810,
      "numSlots": 190,
      "numTransactions": 252766,
      "samplePeriodSecs": 60,
      "slot": 447946402
    },
    {
      "numNonVoteTransactions": 124362,
      "numSlots": 191,
      "numTransactions": 253108,
      "samplePeriodSecs": 60,
      "slot": 447946212
    }
  ],
  "id": 1
}
```

## Notes

- `numTransactions / samplePeriodSecs` gives total TPS including votes; `numNonVoteTransactions / samplePeriodSecs` excludes the large, fairly constant vote-transaction load, which is usually what "network TPS" means.
- `samplePeriodSecs / numSlots` gives the realized average slot time for the window, about 314 ms (60 / 191) in this example.

