Skip to content

Commit

Permalink
add experimental tracing panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Light2Dark committed Dec 14, 2024
1 parent ee85f1d commit 2b3050c
Show file tree
Hide file tree
Showing 5 changed files with 410 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/editor/cell/CellStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({
return null;
};

const ElapsedTime = (props: { elapsedTime: string }) => {
export const ElapsedTime = (props: { elapsedTime: string }) => {
return (
<span className="tracking-wide font-semibold">{props.elapsedTime}</span>
);
Expand All @@ -346,7 +346,7 @@ const LastRanTime = (props: { lastRanTime: number }) => {
);
};

function formatElapsedTime(elapsedTime: number | null) {
export function formatElapsedTime(elapsedTime: number | null) {
if (elapsedTime === null) {
return "";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Copyright 2024 Marimo. All rights reserved. */
import { Tracing } from "@/components/tracing/tracing";
import React from "react";

export const TracingPanel: React.FC = () => {
return <Tracing />;
};
9 changes: 9 additions & 0 deletions frontend/src/components/editor/chrome/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
NotebookPenIcon,
BoxIcon,
BotMessageSquareIcon,
ActivityIcon,
} from "lucide-react";

export type PanelType =
Expand All @@ -22,6 +23,7 @@ export type PanelType =
| "variables"
| "outline"
| "dependencies"
| "tracing"
| "packages"
| "documentation"
| "snippets"
Expand Down Expand Up @@ -94,6 +96,13 @@ export const PANELS: PanelDescriptor[] = [
tooltip: "Notebook logs",
position: "sidebar",
},
{
type: "tracing",
Icon: ActivityIcon,
tooltip: "Tracing",
position: "sidebar",
hidden: !getFeatureFlag("tracing"),
},
{
type: "snippets",
Icon: SquareDashedBottomCodeIcon,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/editor/dynamic-favicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEventListener } from "@/hooks/useEventListener";
import { usePrevious } from "@dnd-kit/utilities";
import { useEffect } from "react";

const FAVICONS = {
export const FAVICONS = {
idle: "./favicon.ico",
success: "./circle-check.ico",
running: "./circle-play.ico",
Expand Down
Loading

0 comments on commit 2b3050c

Please sign in to comment.