mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-26 00:06:13 +08:00
(ui): Add Queue memory usage chart
This commit is contained in:
@@ -79,6 +79,7 @@ export interface QueueLocation {
|
||||
export interface MetricsResponse {
|
||||
queue_size: PrometheusMetricsResponse;
|
||||
queue_latency_seconds: PrometheusMetricsResponse;
|
||||
queue_memory_usage_approx_bytes: PrometheusMetricsResponse;
|
||||
pending_tasks_by_queue: PrometheusMetricsResponse;
|
||||
retry_tasks_by_queue: PrometheusMetricsResponse;
|
||||
archived_tasks_by_queue: PrometheusMetricsResponse;
|
||||
|
||||
@@ -7,6 +7,7 @@ import Container from "@material-ui/core/Container";
|
||||
import Grid from "@material-ui/core/Grid";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import WarningIcon from "@material-ui/icons/Warning";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import { getMetricsAsync } from "../actions/metricsActions";
|
||||
import { AppState } from "../store";
|
||||
import QueueMetricsChart from "../components/QueueMetricsChart";
|
||||
@@ -140,6 +141,17 @@ function MetricsView(props: Props) {
|
||||
/>
|
||||
</Grid>
|
||||
)}
|
||||
{data?.queue_size && (
|
||||
<Grid item xs={12}>
|
||||
<ChartRow
|
||||
title="Queue Memory Usage (approx)"
|
||||
metrics={data.queue_memory_usage_approx_bytes}
|
||||
endTime={endTimeSec}
|
||||
startTime={endTimeSec - durationSec}
|
||||
yAxisTickFormatter={(val: number) => prettyBytes(val)}
|
||||
/>
|
||||
</Grid>
|
||||
)}
|
||||
{data?.pending_tasks_by_queue && (
|
||||
<Grid item xs={12}>
|
||||
<ChartRow
|
||||
|
||||
Reference in New Issue
Block a user