explaingit

michelecampi/inferscope

Analysis updated 2026-05-18

0RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A command-line tool that measures the real speed and resource usage of a local AI language model server as it generates text.

Mindmap

mindmap
  root((inferscope))
    What it does
      Per-token timing
      Memory and CPU sampling
      Text and JSON reports
    Tech stack
      Rust
      Cargo workspace
      OpenAI-compatible API
    Use cases
      Benchmark an LLM server
      Compare inference engines
      Diagnose slow generation
    Audience
      Developers running local LLMs
      ML infra engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Measure time-to-first-token and tokens-per-second for a local llama.cpp, vLLM, or Ollama server.

USE CASE 2

Track CPU and memory usage of an inference server while it generates a response.

USE CASE 3

Export raw per-token timing data as JSON for further analysis.

USE CASE 4

Compare the performance of different inference engines running the same model.

What is it built with?

RustCargo

How does it compare?

michelecampi/inferscope404-agent/codes-minerbakome-hub/bakome-crypto-quant-engine
Stars000
LanguageRustRustRust
Setup difficultymoderatemoderateeasy
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Rust 1.83+ to build from source, project is alpha and its CLI may still change.

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.

In plain English

Inferscope is a command-line profiler written in Rust for measuring how well a local AI language model inference server is actually performing. If you run an LLM server yourself, the kind that exposes an OpenAI-compatible API, inferscope tells you not just whether it responded, but exactly how long each step took and how much system memory and CPU it consumed while doing so. The tool works by sending requests to any inference server that speaks the standard OpenAI API format (the README names llama.cpp's server, vLLM, Ollama, and others as compatible targets), then recording the timing of each individual token as it is generated. From this it derives: how long until the first token appeared (time to first token), the average and distribution of the gap between tokens (inter-token latency), the overall speed in tokens per second, and the total request duration. Simultaneously, it samples the server process's memory (RSS, how much RAM is actually in use), CPU percentage, and thread count from the Linux /proc filesystem, and correlates all of that on a shared clock so you can see resource usage alongside generation speed. Output is available as readable plain text or as a JSON document that includes the raw per-token timestamps, allowing further analysis without re-running the probe. The project is built as a Cargo workspace (Rust's multi-crate project format) split into five purpose-specific crates. It requires Rust 1.83 or newer and is currently in alpha. GPU resource monitoring is planned for a future release.

Copy-paste prompts

Prompt 1
Show me how to run inferscope against a local llama.cpp server and explain the summary output.
Prompt 2
Explain the difference between time-to-first-token and inter-token latency in inferscope's report.
Prompt 3
Walk me through building inferscope from source with cargo build --release --workspace.
Prompt 4
What does each of inferscope's five crates (is-core, is-probe, is-sysmon, is-report, inferscope) do?
Prompt 5
How would I use inferscope's JSON output to compare two different inference engines?

Frequently asked questions

What is inferscope?

A command-line tool that measures the real speed and resource usage of a local AI language model server as it generates text.

What language is inferscope written in?

Mainly Rust. The stack also includes Rust, Cargo.

What license does inferscope use?

Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.

How hard is inferscope to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is inferscope for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.