Skip to content

Commit

Permalink
added latency formatter in playground
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Apr 22, 2024
1 parent 774b9ea commit 4e0f873
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import dayjs from "dayjs"
import relativeTime from "dayjs/plugin/relativeTime"
import duration from "dayjs/plugin/duration"
import {useQueryParam} from "@/hooks/useQuery"
import {formatLatency} from "@/lib/helpers/formatters"

dayjs.extend(relativeTime)
dayjs.extend(duration)
Expand Down Expand Up @@ -229,7 +230,7 @@ const BoxComponent: React.FC<BoxComponentProps> = ({
<p>
Latency:{" "}
{additionalData.latency !== null
? `${Math.round(additionalData.latency * 1000)}ms`
? formatLatency(additionalData.latency)
: "0ms"}
</p>
</Space>
Expand Down

0 comments on commit 4e0f873

Please sign in to comment.