slotgauge

command
v0.6.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command slotgauge measures how many distinct compiled ANE functions one process can keep encoded in a stream, and whether another process holding that resource moves the number — the occupancy signal any scheduler around the function ceiling has to consult.

Today the only signal is failure: e5rt.MaxPipelineFunctions hard-codes the largest stream a fresh process has achieved, and a pipeline that collides with someone else's allocation just fails. This command replaces the constant's context with a measurement.

Mechanism

The probe is exhaustion by construction. It prepares a set of deliberately distinct compiled bundles, then adds their functions to one E5RT stream one at a time — the same shape of composition a pipeline performs — recording the largest count that encoded successfully.

Each increment runs in a short-lived subprocess. E5RT reports some failures by throwing through the FFI rather than returning a status, which terminates the process in an unrelated frame; a probe that must survive its subject cannot share a process with it. The parent counts a crashed increment as the end of the measurement, which is exactly the information a caller at scheduling time would have.

Two polarities, both required

A gauge that only ever reported a number could be broken in ways that look like success. Both directions are checked against live contention:

  • Lower under load. A child process — own session, spawned detached — holds the full freshly-measured ceiling of distinct functions in its own streams. While it holds them, the parent re-measures and must see a strictly smaller number. If it does not drop, the resource is not shared the way the earlier stream-retention control observed, and this command refuses to print an occupancy verdict that nothing supports.

  • Recovery on release. After the child releases everything and exits, the parent re-measures again and must recover the original count. Without this arm, a low reading under load could not be distinguished from the machine having drifted for unrelated reasons.

What is claimed

Measured here: fp16 identity functions on this machine, one stream at a time, with contention generated by a second process running as the same user. Distinctness is textual (different spatial extents produce different programs), because whether E5RT deduplicates identical binaries is itself unverified and must not be leaned on. The printed numbers are observations of this run, not constants; MaxPipelineFunctions remains the conservative planning figure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL