Skip to content

Latest commit

 

History

History
110 lines (82 loc) · 3.65 KB

File metadata and controls

110 lines (82 loc) · 3.65 KB

Benchmarks

This section provides performance benchmarks for all Neumann crates, measured using Criterion.rs.

Running Benchmarks

# Run all benchmarks
cargo bench

# Run benchmarks for a specific crate
cargo bench --package tensor_store
cargo bench --package relational_engine
cargo bench --package graph_engine
cargo bench --package vector_engine
cargo bench --package neumann_parser
cargo bench --package query_router
cargo bench --package neumann_shell
cargo bench --package tensor_compress
cargo bench --package tensor_vault
cargo bench --package tensor_cache
cargo bench --package tensor_chain
cargo bench --package tensor_checkpoint
cargo bench --package tensor_unified
cargo bench --package neumann_server

Benchmark reports are generated in target/criterion/ with HTML visualizations.

Performance Summary

In-Memory Operations

Component Key Metric Performance
tensor_store Concurrent writes 7.5M/sec @ 1M entities
relational_engine Indexed lookup 2.9us (1,604x vs scan)
graph_engine BFS traversal 3us/node
vector_engine HNSW search 150us @ 10K vectors
tensor_compress TT decompose 10-20x compression
tensor_vault AES-256-GCM 24us get, 29us set
tensor_cache Exact lookup 208ns hit
tensor_chain Conflict detection 52M pairs/sec @ 99% sparse
neumann_parser Query parsing 1.9M queries/sec
query_router Mixed workload 455 queries/sec

Durable Storage (WAL)

Operation Key Metric Performance
WAL writes Durable PUT (128d embeddings) 1.4M ops/sec
WAL recovery Replay 10K records ~400us (25M records/sec)

All engines (RelationalEngine, GraphEngine, VectorEngine) support optional durability via open_durable() with full crash consistency.

Hardware Notes

Benchmarks run on:

  • Apple M-series (ARM64) or Intel x86_64
  • Results may vary based on CPU cache sizes, memory bandwidth, and core count

For consistent benchmarking:

# Disable CPU frequency scaling (Linux)
sudo cpupower frequency-set --governor performance

# Run with minimal background activity
cargo bench -- --noplot  # Skip HTML report generation for faster runs

Benchmark Categories

Storage Layer

Engines

Extended Modules

Distributed Systems

Query Layer