* Gets the bloat stats for a given collectionId across all shards. */
| 165 | * Gets the bloat stats for a given collectionId across all shards. |
| 166 | */ |
| 167 | CollectionBloatStats |
| 168 | GetCollectionBloatEstimate(uint64 collectionId) |
| 169 | { |
| 170 | int numValues = 1; |
| 171 | Datum values[1] = { UInt64GetDatum(collectionId) }; |
| 172 | Oid types[1] = { INT8OID }; |
| 173 | List *workerBsons = RunQueryOnAllServerNodes("BloatStats", values, types, numValues, |
| 174 | get_bloat_stats_worker, |
| 175 | ApiInternalSchemaNameV2, |
| 176 | "get_bloat_stats_worker"); |
| 177 | return MergeBloatStatsBsons(workerBsons); |
| 178 | } |
| 179 | |
| 180 | |
| 181 | /* |
no test coverage detected