Skip to content

fix(trace): use microseconds for chrome trace timestamps#13911

Merged
Alizter merged 4 commits intoocaml:mainfrom
Alizter:push-nlsmlklkoxsm
Mar 25, 2026
Merged

fix(trace): use microseconds for chrome trace timestamps#13911
Alizter merged 4 commits intoocaml:mainfrom
Alizter:push-nlsmlklkoxsm

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Mar 25, 2026

Chrome Trace Event Format requires timestamps in microseconds, but json_of_event was emitting seconds. We therefore now convert for both the ts and dur fields in chrome trace mode.

Chrome Trace Event Format requires timestamps in microseconds, but
json_of_event was emitting seconds (regression from c01c7d1).
Convert from nanoseconds using integer division (to_ns / 1000) for
both ts and dur fields in chrome mode.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter mentioned this pull request Mar 25, 2026
33 tasks
@Alizter Alizter requested a review from rgrinberg March 25, 2026 09:15
Alizter added 2 commits March 25, 2026 10:35
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. A CHANGES entry would be appropriate as well.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter force-pushed the push-nlsmlklkoxsm branch from 0f98dd1 to 35a6f00 Compare March 25, 2026 10:59
@Alizter Alizter merged commit 1ecbb62 into ocaml:main Mar 25, 2026
29 checks passed
@Alizter Alizter deleted the push-nlsmlklkoxsm branch March 25, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dune trace cat --chrome-trace has wrong timing units

2 participants