pipesink, the pipe demo's checking sink as a native mesh worker: drains digests, verifies each sha256d, histograms latency
$ sexc add @ajax/mesh-prog-pipesink- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 03:26v/# 1 version
- drwxr-xr-x-Oct 27 03:26files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 03:26 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-worker ^0.1.0, @ajax/mesh-worker-ctx ^0.1.0, @ajax/mesh-worker-node ^0.1.0, @ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi-view-pipedemo ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-abi-pipe ^0.1.0, @ajax/mesh-ref-sha256d ^0.1.0, @ajax/hist-quantile ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- none yet
- keywords
- mesh alphaos native worker program
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/programs/pipesink
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-prog-pipesink 2 3The pipe demo's checking sink, a native worker program: it drains its inbox of `digest` records, 4checks each against its own SHA-256d of the msg rebuilt from the seq, counts GPU- and CPU-hashed ones, 5and histograms the latency since the source stamped the msg (1 us bins, p50/p90/p99). 6 7- **Ported from:** alpha-rust-mesh `programs/pipesink/src/main.rs`. 8- **Tests:** on @ajax/mesh-worker-node's loop with a test mailbox: 40 digests (3 corrupted) drained and 9 checked, the counters, the histogram and the percentiles, an empty inbox, and reset. They currently 10 skip the drain checks with a message: @ajax/mesh-worker-ctx's `mesh_ctx_pipe_len` treats 11 `mesh_pipe_target`'s success (0) as a failure. With that one-character fix applied, they all pass.