feat: add duration display

This commit is contained in:
BennyKok committed 2024-01-20 17:46:15 +08:00
1 parent 1a0d73ff8b
commit c98a16a2dd
6 files changed
+39 -11

No files matched your search

+4
View File
@@ -23,6 +23,10 @@ export async function findAllRuns({
extras: {
number: sql<number>`row_number() over (order by created_at)`.as("number"),
total: sql<number>`count(*) over ()`.as("total"),
duration:
sql<number>`(extract(epoch from ended_at) - extract(epoch from created_at))`.as(
"duration"
),
},
with: {
machine: {