-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR does the following changes: - Added a `scale` parameter to `Metrics` so that I could support a duration metric that's being emitted in Seconds rather than Nanoseconds. - Added support for minutes and hours in Duration graphs - There is now a "Changefeed Status" graph to show counts of Running/Paused/Failed - There is now a "Commit Latency" graph to show P50,P90, and P99 commit latencies - Sink Byte Traffic is now Emitted Bytes - Sink Timings has been removed because I don't believe either of the metrics exist anymore - Max Changefeed Latency is now Max Checkpoint Latency - There is now a Backfill Pending Ranges graph - There is now a Oldest Protected Timestamp graph - There is now a Schema Registry Registrations graph Release note (ui change): The metrics page for changefeeds has been updated with new graphs to track backfill progress, protected timestamps age, and number of schema registry registrations.
- Loading branch information
Showing
9 changed files
with
177 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
pkg/ui/workspaces/cluster-ui/src/graphs/utils/domain.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2023 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
import { ComputeDurationAxisDomain } from "./domain"; | ||
|
||
describe("Domain utils", () => { | ||
describe("ComputeDurationAxisDomain", () => { | ||
it("should correctly format the label and guide", () => { | ||
const nsTestCases = [ | ||
{ ns: 5, value: "5.00", unit: "ns" }, | ||
{ ns: 60_000, value: "60.00", unit: "µs" }, | ||
{ ns: 7_000_000, value: "7.00", unit: "ms" }, | ||
{ ns: 40_240_000_000, value: "40.24", unit: "s" }, | ||
{ ns: 100_000_000_500, value: "1.67", unit: "min" }, | ||
{ ns: 4_000_000_000_000, value: "1.11", unit: "hr" }, | ||
{ ns: 600_000_000_000_000, value: "166.67", unit: "hr" }, | ||
]; | ||
|
||
for (const { ns: extentMax, unit } of nsTestCases) { | ||
const axis = ComputeDurationAxisDomain([0, extentMax]); | ||
expect(axis).toHaveProperty("label", unit); | ||
expect(axis).toHaveProperty("guideFormat"); | ||
expect(axis.guideFormat(undefined)).toEqual(`0.00 ns`); | ||
for (const { | ||
ns: guideNs, | ||
value: guideValue, | ||
unit: guideUnit, | ||
} of nsTestCases) { | ||
expect(axis.guideFormat(guideNs)).toEqual( | ||
`${guideValue} ${guideUnit}`, | ||
); | ||
} | ||
} | ||
}); | ||
|
||
it("should use the units of the lowest extent if given undefined or 0", () => { | ||
const axis = ComputeDurationAxisDomain([2000, 2_500_000]); | ||
expect(axis.guideFormat(undefined)).toEqual(`0.00 µs`); | ||
expect(axis.guideFormat(0)).toEqual(`0.00 µs`); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters