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 deserialisation capabilities for raw JSON #184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BenCurran98
Copy link

@BenCurran98 BenCurran98 commented Jan 14, 2025

Hi, I've had a go at adding some deserialisation capabilities for the current simple JSON functionality we have (with the todict function). Ideally something like #136 (particularly the suggestion to use StructTypes and JSON3)would be much nicer to have, but this might do in the interim?

t₁, b₁ = time_ns(), gc_bytes()
Δt, Δb = t₁ - t₀, b₁ - b₀
# make sure the deltas we report actually match the time elapsed - can cause problems if we go back to look at results at a later time
Δt, Δb = totmeasured(to)
Copy link
Author

Choose a reason for hiding this comment

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

I've added this in since I found if I deserialised a TimerOutput that I ran several hours ago, it showed the "total time" as being e.g. 7 hours, when the actual time was only 400 seconds. This way, the delta remains unaffected by time elapsed since the operation was run

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.

1 participant