Skip to content

Commit

Permalink
fix: typo avatar (GreptimeTeam#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jul 20, 2024
1 parent 32ff626 commit b78ed55
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions docs/nightly/en/user-guide/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide will help you explore each powerful feature of GreptimeDB.

Let's start with a SQL query example.

To monitor the performance and reliability of specific metrics,
To monitor the performance and reliability of specific metrics,
engineers commonly analyze data over time at regular intervals using queries.
This often involves joining two data sources.
However, executing a query like the one below was previously impossible,
Expand All @@ -25,24 +25,24 @@ FROM
metrics INNER JOIN logs on metrics.host = logs.host
WHERE
time > now() - INTERVAL '1 hour' AND
matches(path, '/api/v1/avator')
matches(path, '/api/v1/avatar')
ALIGN '5s' BY (host) FILL PREV
```

This query analyzes the performance and errors of a specific API path (`/api/v1/avator`) over the past hour.
This query analyzes the performance and errors of a specific API path (`/api/v1/avatar`) over the past hour.
It calculates the 95th percentile latency and the number of errors in 15-second intervals and aligns the results to 5-second intervals for continuity and readability.

Break down the query step by step:

1. SELECT clause:
1. SELECT clause:
- `host`: Selects the host field.
- `approx_percentile_cont(latency, 0.95) RANGE '15s' as p95_latency`: Calculates the 95th percentile of latency within a 15-second range and labels it as p95_latency.
- `count(error) RANGE '15s' as num_errors`: Counts the number of errors within a 15-second range and labels it as num_errors.
2. FROM clause:
2. FROM clause:
- `metrics INNER JOIN logs on metrics.host = logs.host`: Joins the metrics and logs tables on the host field.
3. WHERE clause:
3. WHERE clause:
- `time > now() - INTERVAL '1 hour'`: Filters the records to include only those from the past hour.
- `matches(path, '/api/v1/avator')`: Filters the records to include only those matching the path `/api/v1/avator`.
- `matches(path, '/api/v1/avatar')`: Filters the records to include only those matching the path `/api/v1/avatar`.
4. ALIGN clause:
- `ALIGN '5s' BY (host) FILL PREV`: Aligns the results to every 5 seconds and fills in missing values with the previous non-null value.

Expand Down
6 changes: 3 additions & 3 deletions docs/nightly/zh/user-guide/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ FROM
metrics INNER JOIN logs on metrics.host = logs.host
WHERE
time > now() - INTERVAL '1 hour' AND
matches(path, '/api/v1/avator')
matches(path, '/api/v1/avatar')
ALIGN '5s' BY (host) FILL PREV
```

该查询分析了过去一小时内特定 API 路径 (`/api/v1/avator`) 的性能和错误。
该查询分析了过去一小时内特定 API 路径 (`/api/v1/avatar`) 的性能和错误。
它计算了每个 15 秒间隔内的第 95 百分位延迟和错误数量,并将结果对齐到每个 5 秒间隔以保持连续性和可读性。

逐步解析该查询:
Expand All @@ -42,7 +42,7 @@ ALIGN '5s' BY (host) FILL PREV
- `metrics INNER JOIN logs on metrics.host = logs.host`:在 host 字段上将 metrics 和 logs 表进行连接。
3. WHERE 子句:
- `time > now() - INTERVAL '1 hour'`:筛选出过去一小时内的记录。
- `matches(path, '/api/v1/avator')`:筛选出特定 API 路径 `/api/v1/avator` 的记录。
- `matches(path, '/api/v1/avatar')`:筛选出特定 API 路径 `/api/v1/avatar` 的记录。
4. ALIGN 子句:
- `ALIGN '5s' BY (host) FILL PREV`:将结果对齐到每 5 秒,并使用前一个非空值填充缺失值。

Expand Down
14 changes: 7 additions & 7 deletions docs/v0.9/en/user-guide/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide will help you explore each powerful feature of GreptimeDB.

Let's start with a SQL query example.

To monitor the performance and reliability of specific metrics,
To monitor the performance and reliability of specific metrics,
engineers commonly analyze data over time at regular intervals using queries.
This often involves joining two data sources.
However, executing a query like the one below was previously impossible,
Expand All @@ -25,24 +25,24 @@ FROM
metrics INNER JOIN logs on metrics.host = logs.host
WHERE
time > now() - INTERVAL '1 hour' AND
matches(path, '/api/v1/avator')
matches(path, '/api/v1/avatar')
ALIGN '5s' BY (host) FILL PREV
```

This query analyzes the performance and errors of a specific API path (`/api/v1/avator`) over the past hour.
This query analyzes the performance and errors of a specific API path (`/api/v1/avatar`) over the past hour.
It calculates the 95th percentile latency and the number of errors in 15-second intervals and aligns the results to 5-second intervals for continuity and readability.

Break down the query step by step:

1. SELECT clause:
1. SELECT clause:
- `host`: Selects the host field.
- `approx_percentile_cont(latency, 0.95) RANGE '15s' as p95_latency`: Calculates the 95th percentile of latency within a 15-second range and labels it as p95_latency.
- `count(error) RANGE '15s' as num_errors`: Counts the number of errors within a 15-second range and labels it as num_errors.
2. FROM clause:
2. FROM clause:
- `metrics INNER JOIN logs on metrics.host = logs.host`: Joins the metrics and logs tables on the host field.
3. WHERE clause:
3. WHERE clause:
- `time > now() - INTERVAL '1 hour'`: Filters the records to include only those from the past hour.
- `matches(path, '/api/v1/avator')`: Filters the records to include only those matching the path `/api/v1/avator`.
- `matches(path, '/api/v1/avatar')`: Filters the records to include only those matching the path `/api/v1/avatar`.
4. ALIGN clause:
- `ALIGN '5s' BY (host) FILL PREV`: Aligns the results to every 5 seconds and fills in missing values with the previous non-null value.

Expand Down
6 changes: 3 additions & 3 deletions docs/v0.9/zh/user-guide/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ FROM
metrics INNER JOIN logs on metrics.host = logs.host
WHERE
time > now() - INTERVAL '1 hour' AND
matches(path, '/api/v1/avator')
matches(path, '/api/v1/avatar')
ALIGN '5s' BY (host) FILL PREV
```

该查询分析了过去一小时内特定 API 路径 (`/api/v1/avator`) 的性能和错误。
该查询分析了过去一小时内特定 API 路径 (`/api/v1/avatar`) 的性能和错误。
它计算了每个 15 秒间隔内的第 95 百分位延迟和错误数量,并将结果对齐到每个 5 秒间隔以保持连续性和可读性。

逐步解析该查询:
Expand All @@ -42,7 +42,7 @@ ALIGN '5s' BY (host) FILL PREV
- `metrics INNER JOIN logs on metrics.host = logs.host`:在 host 字段上将 metrics 和 logs 表进行连接。
3. WHERE 子句:
- `time > now() - INTERVAL '1 hour'`:筛选出过去一小时内的记录。
- `matches(path, '/api/v1/avator')`:筛选出特定 API 路径 `/api/v1/avator` 的记录。
- `matches(path, '/api/v1/avatar')`:筛选出特定 API 路径 `/api/v1/avatar` 的记录。
4. ALIGN 子句:
- `ALIGN '5s' BY (host) FILL PREV`:将结果对齐到每 5 秒,并使用前一个非空值填充缺失值。

Expand Down

0 comments on commit b78ed55

Please sign in to comment.