From 4e0f8738b35ebab10e8b7f7c9168d7b480abf34e Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Mon, 22 Apr 2024 15:33:09 +0100 Subject: [PATCH] added latency formatter in playground --- agenta-web/src/components/Playground/Views/TestView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agenta-web/src/components/Playground/Views/TestView.tsx b/agenta-web/src/components/Playground/Views/TestView.tsx index 0667fbedde..66412f2011 100644 --- a/agenta-web/src/components/Playground/Views/TestView.tsx +++ b/agenta-web/src/components/Playground/Views/TestView.tsx @@ -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) @@ -229,7 +230,7 @@ const BoxComponent: React.FC = ({

Latency:{" "} {additionalData.latency !== null - ? `${Math.round(additionalData.latency * 1000)}ms` + ? formatLatency(additionalData.latency) : "0ms"}