> ## Documentation Index
> Fetch the complete documentation index at: https://harisfazillah.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference: bench_brain.py

> Spatial brain performance benchmarking utility. Deep State of Mind framework. Deep State of Mind framework. Deep State of Mind framework.

Spatial brain performance benchmarking utility.

## Description

The `bench_brain.py` tool measures read latency and byte throughput across brain assets and custom skills, calibrating performance multipliers for native OS and simulated mobile FUSE environments.

## Script path

`tools/bench_brain.py`

## CLI signature

```bash theme={null}
uv run python tools/bench_brain.py

```

## Inputs

Scans two target paths:

* `.agents/brain`
* `.agents/skills`

## Outputs

Telemetry results printed directly to the shell terminal:

* Count of scanned files and total parsed byte volumes.
* Total read times for native OS (in milliseconds).
* Estimated mobile (Samsung Note 10) Termux FUSE latency extrapolations (using a default `3.5x` multiplier).

## Dependencies

* **Python:** Standard library only (no external packages required).

## Internal Python API

### `get_files(directories, extension)`

Recursively gathers matching files.

* **Arguments:** `directories` (string list), `extension` (string, defaults to `.md`).
* **Returns:** String path list.

### `bench_read(files)`

Evaluates overall reading performance.

* **Returns:** Tuple containing `(total_bytes, elapsed_seconds)`.

***

*Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-08-14*
*Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0*


## Related topics

- [Reference Material Index](/reference/index.md)
- [DSOM Token Performance Playbook](/governance/dsom-token-performance-playbook.md)
- [Automation & Script Audit Ledger](/governance/automation-audit-list.md)
- [🧠 The Tri-Phasic Mind: DSOM Cognitive Architecture and Functional Subsystems](/governance/dsom-tri-phasic-cognitive-architecture.md)
- [Reference: mcp_server.md](/reference/mcp_server.md)
