Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp to module logs #641

Merged
merged 2 commits into from
Dec 9, 2023
Merged

Add timestamp to module logs #641

merged 2 commits into from
Dec 9, 2023

Conversation

coolreader18
Copy link
Collaborator

Description of Changes

Unsure about the TODO comment; walltime now breaks the illusion that all of a reducer happens at the same time, albeit not in a way observable to wasm. However, if we go with logical now it's more likely that the order of timestamps in the log would be non-monotonic, and we lose the information of how long between 2 logs internal to the same reducer.

Expected complexity level and risk

1

@joshua-spacetime joshua-spacetime linked an issue Dec 7, 2023 that may be closed by this pull request
@coolreader18
Copy link
Collaborator Author

coolreader18 commented Dec 8, 2023

(the tests needed updating because they separated the log prefix from the message by the 4th colon, but the timestamp has 2 colons in it)

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

This looks good to me. Initially my thought was to go with reducer time, but actually I think wall-time is the better solution to go with here at least for now. My reasoning is that a random user is not going to understand why all of their logs in the same reducer are running at the same exact millisecond.

Ultimately I would recommend stuffing both into the Record type.

@cloutiertyler cloutiertyler enabled auto-merge (squash) December 8, 2023 23:14
@coolreader18
Copy link
Collaborator Author

oh lol those weren't even flukes, I just missed them when going through & updating the tests

@cloutiertyler cloutiertyler merged commit f8296c0 into master Dec 9, 2023
@coolreader18 coolreader18 deleted the noa/module-log-ts branch February 9, 2024 22:30
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.

Add timestamps to module logs
2 participants