Skip to content

Commit

Permalink
doc/user: document new history relations
Browse files Browse the repository at this point in the history
  • Loading branch information
teskje committed Aug 30, 2024
1 parent 6681833 commit ec750bf
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
36 changes: 36 additions & 0 deletions doc/user/content/sql/system-catalog/mz_internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,24 @@ At this time, we do not make any guarantees about the exactness or freshness of
| `memory_bytes` | [`uint8`] | Approximate RAM usage, in bytes. |
| `disk_bytes` | [`uint8`] | Approximate disk usage in bytes. |

## `mz_cluster_replica_metrics_history`

{{< warn-if-unreleased v0.116 >}}
The `mz_cluster_replica_metrics_history` table records resource utilization metrics
for all processes of all extant cluster replicas.

At this time, we do not make any guarantees about the exactness or freshness of these numbers.

<!-- RELATION_SPEC mz_internal.mz_cluster_replica_metrics_history -->
| Field | Type | Meaning
| ---------------- | --------- | --------
| `replica_id` | [`text`] | The ID of a cluster replica.
| `process_id` | [`uint8`] | An identifier of a process within the replica.
| `cpu_nano_cores` | [`uint8`] | Approximate CPU usage in billionths of a vCPU core.
| `memory_bytes` | [`uint8`] | Approximate memory usage in bytes.
| `disk_bytes` | [`uint8`] | Approximate disk usage in bytes.
| `occurred_at` | [`timestamp with time zone`] | Wall-clock timestamp at which the event occurred.

## `mz_cluster_replica_statuses`

The `mz_cluster_replica_statuses` table contains a row describing the status
Expand Down Expand Up @@ -211,6 +229,24 @@ At this time, we do not make any guarantees about the exactness or freshness of
| `memory_percent` | [`double precision`] | Approximate RAM usage in percent of the total allocation. |
| `disk_percent` | [`double precision`] | Approximate disk usage in percent of the total allocation. |

## `mz_cluster_replica_utilization_history`

{{< warn-if-unreleased v0.116 >}}
The `mz_cluster_replica_utilization_history` view records resource utilization metrics
for all processes of all extant cluster replicas, as a percentage of the total resource allocation.

At this time, we do not make any guarantees about the exactness or freshness of these numbers.

<!-- RELATION_SPEC mz_internal.mz_cluster_replica_utilization_history -->
| Field | Type | Meaning
|------------------|----------------------|--------
| `replica_id` | [`text`] | The ID of a cluster replica.
| `process_id` | [`uint8`] | An identifier of a compute process within the replica.
| `cpu_percent` | [`double precision`] | Approximate CPU usage in percent of the total allocation.
| `memory_percent` | [`double precision`] | Approximate RAM usage in percent of the total allocation.
| `disk_percent` | [`double precision`] | Approximate disk usage in percent of the total allocation.
| `occurred_at` | [`timestamp with time zone`] | Wall-clock timestamp at which the event occurred.

## `mz_cluster_replica_history`

The `mz_cluster_replica_history` view contains information about the timespan of
Expand Down
22 changes: 22 additions & 0 deletions test/sqllogictest/autogenerated/mz_internal.slt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
4 memory_bytes uint8
5 disk_bytes uint8

query ITT
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_metrics_history' ORDER BY position
----
1 replica_id text
2 process_id uint8
3 cpu_nano_cores uint8
4 memory_bytes uint8
5 disk_bytes uint8
6 occurred_at timestamp␠with␠time␠zone

query ITT
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_statuses' ORDER BY position
----
Expand All @@ -135,6 +145,16 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
4 memory_percent double␠precision
5 disk_percent double␠precision

query ITT
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_utilization_history' ORDER BY position
----
1 replica_id text
2 process_id uint8
3 cpu_percent double␠precision
4 memory_percent double␠precision
5 disk_percent double␠precision
6 occurred_at timestamp␠with␠time␠zone

query ITT
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_history' ORDER BY position
----
Expand Down Expand Up @@ -569,8 +589,10 @@ mz_aws_privatelink_connection_statuses
mz_cluster_replica_frontiers
mz_cluster_replica_history
mz_cluster_replica_metrics
mz_cluster_replica_metrics_history
mz_cluster_replica_statuses
mz_cluster_replica_utilization
mz_cluster_replica_utilization_history
mz_cluster_schedules
mz_cluster_workload_classes
mz_comments
Expand Down

0 comments on commit ec750bf

Please sign in to comment.