Skip to content

Commit 3723737

Browse files
committed
Update comment as requested.
1 parent 01fad98 commit 3723737

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.ci/metrics/metrics.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,11 @@ def github_get_metrics(
380380
continue
381381

382382
logging.info(f"Adding a job metric for job {job.id} in workflow {task.id}")
383-
# The timestamp associated with the event is expected by Grafana to
384-
# be in nanoseconds.
383+
# The completed_at_ns timestamp associated with the event is
384+
# expected by Grafana to be in nanoseconds. Because we do math using
385+
# all three times (when creating libc++ aggregates), we need them
386+
# all to be in nanoseconds, even though created_at and started_at
387+
# are not returned to Grafana.
385388
created_at_ns = int(created_at.timestamp()) * 10**9
386389
started_at_ns = int(started_at.timestamp()) * 10**9
387390
completed_at_ns = int(completed_at.timestamp()) * 10**9

0 commit comments

Comments
 (0)