indexing_throughput

command
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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

indexing_throughput measures the wall time, peak memory, and per-phase breakdown of code-graph's pipeline.Run() against a target directory.

Plan 4 T3b (~/Documents/knowledge-base/plans/2026-05-06-codegraph-followup.md post-roundtable). Closes performance gaps #8 (memory footprint), #9 (cold- start), and #10 (indexing throughput) from the 2026-05-06 roundtable META_SYNTHESIS F5.

MEASUREMENT APPROACH:

The harness drives Pipeline.Run() in-process (not via the MCP binary) because:

  1. The dominant work — tree-sitter parsing, multi-pass extraction, SQLite writes — is exercised identically.
  2. In-process measurement is reproducible (no subprocess setup).
  3. We can wire Pipeline.Progress callbacks to record per-phase wall times, which the binary doesn't surface.

Memory measurement uses runtime.MemStats. This captures Go-side heap allocations but NOT CGO-side (tree-sitter) memory. The Sys field reflects total OS memory committed by the Go runtime including CGO arena overhead, so we report both HeapInuse and Sys peak.

Cold-start time is measured separately: time from process start to the first phase callback ("discover").

Output is a JSON baseline file with the same schema pattern as bench/research/baselines/2026-05-06-mcp-latency.json (Plan 3 Phase B).

Usage:

go run ./bench/research/indexing_throughput \
    -target . \
    -output bench/research/baselines/2026-05-06-indexing-throughput.json

# Incremental run (re-index against an already-indexed project):
go run ./bench/research/indexing_throughput -target . -mode incremental

Jump to

Keyboard shortcuts

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