Skip to content

Implement batched logging with auto flush#713

Merged
Olical merged 6 commits intomainfrom
batched-logging-with-auto-flush
Oct 12, 2025
Merged

Implement batched logging with auto flush#713
Olical merged 6 commits intomainfrom
batched-logging-with-auto-flush

Conversation

@Olical
Copy link
Owner

@Olical Olical commented Oct 3, 2025

#689

Before

# bencode
## simple encode and decode x1000 [0.011ms]
## big encode, chunked decode x1000 [2.635ms]
# log
## one logging call at a time x1000 [0.041ms]
## 50 log calls in a row x100 [39.85ms]

After

# bencode
## simple encode and decode x1000 [0.011ms]
## big encode, chunked decode x1000 [2.483ms]
# log
## one logging call at a time x1000 [0.047ms]
## 50 log calls in a row x100 [1.16ms]

Issues

  • When loading the whole sandbox.cljc file the line of xxxxxxxxxxxxxxxxxxxxx don't print as expected. It should be two lines of ; (out) comments with xxxxxxxxxxxxxxxxxx - instead I'm seeing 3 lines, one of which has no ; (out) prefix. When running one print at a time I see the ; (out) on the same line as the ; eval (root-form).
(dyn.bind opts f (unpack args) ...)
(dyn.bind opts f ...)))))
(if (not= 0 (core.count args))
(dyn.bind opts f (unpack (core.concat args [...])))
Copy link
Owner Author

Choose a reason for hiding this comment

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

The linter was complaining saying only the first value from args would be used in the original code. So this change should fix that subtle bug and mean that it uses all of the args now. Unsure though! I'll write a test.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yep! This was a bug, fixed.

@Olical
Copy link
Owner Author

Olical commented Oct 3, 2025

Also updated the extract tests so they work with the new and old tree sitter branches.

@Olical Olical force-pushed the batched-logging-with-auto-flush branch from a5c49bc to 5902386 Compare October 12, 2025 10:58
@Olical Olical merged commit 8c51801 into main Oct 12, 2025
11 checks passed
@Olical Olical deleted the batched-logging-with-auto-flush branch October 12, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant