Files
stacks-blockchain-api/docs/api/transaction/get-mempool-stats.example.json
Matthew Little 9482238599 feat: mempool stats endpoint and prometheus metrics (#1241)
* feat: implement endpoint for various mempool stats

* chore: remove coinbase tx entries from mempool stats (will always be empty)

* chore: update prometheus mempool stats on new block, microblock, and mempool tx

* chore: add mempool tx byte size stats

* chore: add indexes to speedup mempool table queries

* chore: move `registerMempoolPromStats` fn to db helper module

* docs: add OpenAPI schema for new mempool stats endpoint

* chore: tests for mempool stats endpoint

* chore: restore mempool garbage collect env var after test

* chore: bytea serialization tests

* chore: strict hex string handling for bytea value serializer

* chore: improved mempool_tx indexing

* chore: unit test fix
2022-08-03 15:54:36 +02:00

87 lines
1.5 KiB
JSON

{
"tx_type_counts": {
"token_transfer": 130,
"smart_contract": 2,
"contract_call": 310,
"poison_microblock": 0
},
"tx_simple_fee_averages": {
"token_transfer": {
"p25": 3000,
"p50": 3000,
"p75": 6000,
"p95": 401199.9999999995
},
"smart_contract": {
"p25": 837500,
"p50": 925000,
"p75": 1012500,
"p95": 1082500
},
"contract_call": {
"p25": 3000,
"p50": 10368,
"p75": 100000,
"p95": 1000000
},
"poison_microblock": {
"p25": null,
"p50": null,
"p75": null,
"p95": null
}
},
"tx_ages": {
"token_transfer": {
"p25": 167.5,
"p50": 45,
"p75": 1,
"p95": 0
},
"smart_contract": {
"p25": 185.5,
"p50": 129,
"p75": 72.5,
"p95": 27.30000000000001
},
"contract_call": {
"p25": 189,
"p50": 127.5,
"p75": 9.5,
"p95": 0
},
"poison_microblock": {
"p25": null,
"p50": null,
"p75": null,
"p95": null
}
},
"tx_byte_sizes": {
"token_transfer": {
"p25": 180,
"p50": 180,
"p75": 180,
"p95": 180
},
"smart_contract": {
"p25": 706.75,
"p50": 814.5,
"p75": 922.25,
"p95": 1008.45
},
"contract_call": {
"p25": 291,
"p50": 435,
"p75": 462,
"p95": 597
},
"poison_microblock": {
"p25": null,
"p50": null,
"p75": null,
"p95": null
}
}
}