fix(ludic.telemetry): nothing made per event - properties and the line written into kept buffers, the queue a ring of bytes made at the start
An event was a tree of values encoded into a new string, a dropped line was never given back, and every batch and save joined the queue into another. Now: telemetry_props / telemetry_str / _int / _bool write the properties as JSON into a buffer the state keeps; the line is written beside it, its time worked out from the clock's seconds (TelemetryWorld.clock_s, was stamp); its bytes go into one ring (ring_bytes, at most queue_max lines), the oldest overwritten past either; a batch and the file are written into a third kept buffer and go as bytes (TelemetryTransport.send takes the bytes and their length; Http.body_bytes, Fs.write_bytes). The facts are pooled. tests/ring_test: ten thousand events past the cap in lines and in bytes, 0 bytes of heap; the line exact JSON, escaped, 2000-02-29 right; the batch puts the id in; the file round-trips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fc0f3d3790
commit
d1bea7f10e
14 changed files with 454 additions and 97 deletions
|
|
@ -4,8 +4,13 @@ module ludic_telemetry uses ludic_base
|
|||
numbers float
|
||||
import "ludic.base"
|
||||
import "state.ludic"
|
||||
import "facts.ludic"
|
||||
import "ports.ludic"
|
||||
import "props.ludic"
|
||||
import "stamp.ludic"
|
||||
import "ring.ludic"
|
||||
import "queue.ludic"
|
||||
import "load.ludic"
|
||||
import "send.ludic"
|
||||
import "ident.ludic"
|
||||
import "queries.ludic"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue