Skip to content

feat(site): add agent connection timings #15276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix fmt
  • Loading branch information
BrunoQuaresma committed Oct 30, 2024
commit ab8792f005eb70a757e6395b1c1e6c22eda1f180
12 changes: 10 additions & 2 deletions site/src/api/queries/workspaceBuilds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,17 @@ export const infiniteWorkspaceBuilds = (
};

// We use readyAgentsCount to invalidate the query when an agent connects
export const workspaceBuildTimings = (workspaceBuildId: string, readyAgentsCount: number) => {
export const workspaceBuildTimings = (
workspaceBuildId: string,
readyAgentsCount: number,
) => {
return {
queryKey: ["workspaceBuilds", workspaceBuildId, "timings", { readyAgentsCount }],
queryKey: [
"workspaceBuilds",
workspaceBuildId,
"timings",
{ readyAgentsCount },
],
queryFn: () => API.workspaceBuildTimings(workspaceBuildId),
};
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type Theme, useTheme } from "@emotion/react";
import { type FC, useState } from "react";
import { Bar } from "./Chart/Bar";
import {
Expand Down Expand Up @@ -26,7 +27,6 @@ import {
makeTicks,
mergeTimeRanges,
} from "./Chart/utils";
import { type Theme, useTheme } from "@emotion/react";
import type { Stage } from "./StagesChart";

type ResourceTiming = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { type TimeRange, calcDuration, mergeTimeRanges } from "./Chart/utils";
import { ResourcesChart, isCoderResource } from "./ResourcesChart";
import { ScriptsChart } from "./ScriptsChart";
import {
agentStages,
provisioningStages,
type Stage,
StagesChart,
agentStages,
provisioningStages,
} from "./StagesChart";

type TimingView =
Expand Down