# MetricStatService
> 指标统计数据相关服务

---

## countMetricStats
> 计算指标数据数量

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MetricStatService/countMetricStats`
- RPC：`rpc countMetricStats (CountMetricStatsRequest) returns (RPCCountResponse);`

**请求对象 (`CountMetricStatsRequest`)**

```json
{
  "metricItemId": "int64"
}
```

**响应对象 (`RPCCountResponse`)**

```json
{
  "count": "int64 // 数量"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MetricStatService/countMetricStats" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## listMetricStats
> 读取单页指标数据

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/MetricStatService/listMetricStats`
- RPC：`rpc listMetricStats (ListMetricStatsRequest) returns (ListMetricStatsResponse);`

**请求对象 (`ListMetricStatsRequest`)**

```json
{
  "metricItemId": "int64",
  "offset": "int64 // 读取位置",
  "size": "int64 // 数量，通常不能小于0"
}
```

**响应对象 (`ListMetricStatsResponse`)**

```json
{
  "metricStats": "[]MetricStat"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/MetricStatService/listMetricStats" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
