Skip to content

HTTP API: perf

This process's work counters and phase timings: what happened once at startup and what happens per call, for the structural tests and the benchmark evidence.

Rendered from docs/generated/openapi.json, which the executable generates from its capability registry and CI refuses stale. The raw document is at /openapi.json; a running server serves the same document at its own /openapi.json and Swagger UI at /swagger.

perf

This process's work counters and phase timings: what happened once at startup and what happens per call, for the structural tests and the benchmark evidence.

GET /api/v1/perf perf.counters

Performance counters

The counters of this process: repository scans, index and registry builds, schema generations, projection builds, executions, handler invocations, cache hits, misses and evictions, and the phase timings, as they stand now.

  • query
  • behaviorally_verified
  • benchmark required
  • cache disabled
  • MCP tool majordomus_perf

No parameters.

Try it

The port is whatever the server logged; 8741 is the one it asks for first. The values are the operation's first example.

curl -s "http://127.0.0.1:8741/api/v1/perf"

Tested by apps/majordomus-cli/tests/http_serve.rs, which replays the route with these values against a server on a real socket.

Responses

statusbodymeaning
200 CounterSnapshot Performance counters: the result.
400 ErrorBody invalid_input: The input does not fit the schema: a parameter of the wrong type, an unknown one, or a value the capability rejects.
404 ErrorBody not_found: The input names something the repository does not hold.
500 ErrorBody internal: The capability failed for a reason of its own; the message names it.
default ErrorBody Any other failure the transport reports: 405 method_not_allowed for another method on this path, 400 invalid_input for a body that is not a JSON object.

Schemas

The components only this tag's operations use. Each row is the type's own field, its doc comment the description; a type another page owns links there.

CounterSnapshot

object
The counters and phase totals of this process at one moment. Every value is a count or a duration this process measured; none is written anywhere by hand.
propertytyperequireddescription
repository_scans integer (uint64) yes Enumerations of the repository's declared sources.
index_builds integer (uint64) yes Index builds.
registry_builds integer (uint64) yes Registry builds.
schema_generations integer (uint64) yes JSON Schemas derived from Rust types.
mcp_projection_builds integer (uint64) yes MCP tool and resource listings computed.
openapi_builds integer (uint64) yes OpenAPI documents built.
http_projection_builds integer (uint64) yes HTTP routers built.
graph_builds integer (uint64) yes Graphs derived from the registry and the index.
executions integer (uint64) yes Calls through the executor, every transport.
handler_invocations integer (uint64) yes Handlers actually run.
cache_hits integer (uint64) yes Executions answered from the cache.
cache_misses integer (uint64) yes Executions of a cached capability that ran the handler.
cache_evictions integer (uint64) yes Cache entries dropped.
phases map of PhaseTotals → PhaseTotals yes Phase totals by phase name.

Used by perf.counters

PhaseTotals

object
A phase's totals.
propertytyperequireddescription
count integer (uint64) yes How many times the phase ran.
total_nanos integer (uint64) yes Nanoseconds spent in it, summed.

Used by CounterSnapshot

Searches the titles and descriptions of every page this site publishes.