88 TrashIcon ,
99 PauseIcon ,
1010 PlayIcon ,
11+ CircleStackIcon ,
12+ ArrowsUpDownIcon ,
13+ CpuChipIcon ,
1114} from " @heroicons/vue/16/solid"
1215
1316import TabButton from " @/components/TabButton.vue"
@@ -23,6 +26,7 @@ import CachePanel from "@/components/panels/CachePanel.vue"
2326import RequestPanel from " @/components/panels/RequestPanel.vue"
2427import JsonPanel from " @/components/panels/JsonPanel.vue"
2528import RubyLogo from " @/components/ui/RubyLogo.vue"
29+ import Timing from " @/components/ui/Timing.vue"
2630
2731let requestsStore = useRequestsStore ()
2832let configStore = useConfigStore ()
@@ -167,14 +171,17 @@ const setActiveTab = (tab) => {
167171 <div
168172 v-if =" state.minimized"
169173 @click =" state.minimized = false"
170- class =" z-[9999] fixed left-0 bottom-0 bg-transparent cursor-pointer"
174+ class =" z-[9999] text-stone-900 fixed left-0 bottom-0 bg-transparent cursor-pointer"
171175 >
172176 <div class =" p-1 pt-1.5" >
173177 <ruby-logo />
174178 </div >
175179 </div >
176180
177- <div v-if =" !state.minimized && requestsStore.currentRequest == null" class =" z-[9999] fixed left-0 bottom-0 w-full" >
181+ <div
182+ v-if =" !state.minimized && requestsStore.currentRequest == null"
183+ class =" z-[9999] text-stone-900 fixed left-0 bottom-0 w-full"
184+ >
178185 <div class =" h-0.5 bg-red-700 cursor-row-resize" />
179186 <div class =" flex items-center justify-between bg-stone-100 border-b border-stone-200" >
180187 <div class =" px-5 py-1.5 italic" >No request yet</div >
@@ -186,7 +193,10 @@ const setActiveTab = (tab) => {
186193 </div >
187194 </div >
188195
189- <div v-if =" !state.minimized && requestsStore.currentRequest" class =" z-[9999] fixed left-0 bottom-0 w-full" >
196+ <div
197+ v-if =" !state.minimized && requestsStore.currentRequest"
198+ class =" z-[9999] text-stone-900 fixed left-0 bottom-0 w-full"
199+ >
190200 <div id =" draggable-bar" @mousedown =" state.isResizing = true" class =" h-0.5 bg-red-700 cursor-row-resize" />
191201
192202 <div
@@ -224,26 +234,31 @@ const setActiveTab = (tab) => {
224234 </div >
225235
226236 <!-- Right -->
227- <div class =" flex items-center space-x-2.5 pr-1" >
237+ <div class =" flex items-center space-x-3 pr-1" >
238+ <div class =" flex space-x-2" >
239+ <timing :duration-ms =" requestsStore.currentRequest.meta.db_runtime" >
240+ <circle-stack-icon class =" text-stone-600 size-3" />
241+ </timing >
242+
243+ <timing :duration-ms =" requestsStore.currentRequest.meta.cpu_time" >
244+ <cpu-chip-icon class =" text-stone-600 size-3" />
245+ </timing >
246+
247+ <timing
248+ :duration-ms =" requestsStore.currentRequest.meta.duration"
249+ :too-slow-threshold =" 1000"
250+ :slow-threshold =" 750"
251+ class =" font-bold"
252+ >
253+ <arrows-up-down-icon class =" text-stone-800 size-4" />
254+ </timing >
255+ </div >
256+
228257 <div @click =" setActiveTab('request')" class =" flex space-x-2 cursor-pointer" >
229258 <span class =" text-sm text-stone-600 font-medium tracking-wide" >
230259 {{ routeAlias }}
231260 </span >
232261
233- <span
234- class =" text-sm font-bold"
235- v-if =" requestsStore.currentRequest.meta.duration < 1000"
236- :class =" {
237- 'text-orange-600': requestsStore.currentRequest.meta.duration >= 800,
238- }"
239- >{{ requestsStore.currentRequest.meta.duration.toFixed(1) }}ms</span
240- >
241- <span
242- class =" text-sm font-bold text-red-600 bg-red-100 px-1 rounded"
243- v-if =" requestsStore.currentRequest.meta.duration >= 1000"
244- >{{ (requestsStore.currentRequest.meta.duration / 1000).toFixed(2) }}s</span
245- >
246-
247262 <span
248263 class =" px-1 py-0.5 rounded text-xs"
249264 :class =" {
@@ -284,7 +299,7 @@ const setActiveTab = (tab) => {
284299 <play-icon v-if =" !state.isPolling" class =" size-4" />
285300 </button >
286301 <button @click =" clearRequests" title =" Clear all requests (frontend and backend)" >
287- <trash-icon class =" size-4 " />
302+ <trash-icon class =" size-3 " />
288303 </button >
289304 <button @click =" state.minimized = true" title =" Hide in the corner" >
290305 <arrow-down-left-icon class =" size-4" />
0 commit comments