Skip to content

Commit 85b8073

Browse files
authored
Improved Metrics (#533)
Steps should be recorded as of their completion time, not their start time, as they aren't recorded until completed.
1 parent 1555c0f commit 85b8073

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dbos/_sys_db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,9 +2341,9 @@ def get_metrics(self, start_time: str, end_time: str) -> List[MetricData]:
23412341
)
23422342
.where(
23432343
sa.and_(
2344-
SystemSchema.operation_outputs.c.started_at_epoch_ms
2344+
SystemSchema.operation_outputs.c.completed_at_epoch_ms
23452345
>= start_epoch_ms,
2346-
SystemSchema.operation_outputs.c.started_at_epoch_ms
2346+
SystemSchema.operation_outputs.c.completed_at_epoch_ms
23472347
< end_epoch_ms,
23482348
)
23492349
)

0 commit comments

Comments
 (0)