Skip to content

throwaway: NLD latency instrumentation N=2000 (do not merge)#12676

Draft
evelyn-with-warp wants to merge 1 commit into
evelyn/history-match-on-ai-queriesfrom
oz/nld-latency-2000
Draft

throwaway: NLD latency instrumentation N=2000 (do not merge)#12676
evelyn-with-warp wants to merge 1 commit into
evelyn/history-match-on-ai-queriesfrom
oz/nld-latency-2000

Conversation

@evelyn-with-warp

Copy link
Copy Markdown
Contributor

NLD History-Match Latency: N=2000 Measurement (throwaway)

DO NOT MERGE — This is a throwaway instrumentation branch for the NLD latency stress test (N=2000). See plan for context.

What this does

Adds Instant timing around nld_prompt_history() clone and most_recent_close_match prompt scan in detect_and_set_input_type, emitting a NLD_LATENCY grep-able log line per detection.

Results (N=2000, in-process Rust benchmark)

Full-query scan (prompt_scan_us p50/p90):

  • "make a pr": 3µs / 3µs
  • "debug this failure": 3µs / 3µs
  • "curl ...URL" (full, 58 chars): 4µs / 5µs

Curl URL intermediate spike (buffer ≈ seed length ~39-42 chars):

  • Peak prefix[41] = "curl https://github.com/warpdotdev/warp/p": p50=4,365µs / p90=4,405µs
  • Spike window: prefix lengths 33–51
  • Scales roughly linearly with N (agent-c N=10000 saw ~33-39ms, ~8x ratio for 5x N)

Conversation: https://staging.warp.dev/conversation/51ba4553-dc0d-4479-bac4-36983518d0b6
Run: https://oz.staging.warp.dev/runs/019ecd70-9a72-77a4-8555-8631bdfc5edb
This PR was generated with Oz.

Add timing instrumentation to detect_and_set_input_type to measure
nld_prompt_history() clone cost and most_recent_close_match scan cost.
Emits NLD_LATENCY log lines. This is a throwaway branch for measurement only.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant