[PR #69] [MERGED] telemetry: per-request decode expert cache hit rate in DONE and web monitor #2439

Closed
opened 2026-11-04 02:00:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/69
Author: @code-martin
Created: 9/28/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @Niko1221

Base: main ← Head: feature/decode-hit-rate-telemetry


📝 Commits (1)

  • 75e50e6 telemetry: per-request decode expert cache hit rate in DONE and web monitor

📊 Changes

4 files changed (+25 additions, -9 deletions)

View changed files

📝 serve/server.py (+7 -2)
📝 serve/web/app.js (+3 -2)
📝 serve/web/index.html (+2 -2)
📝 src/program/generate.cpp (+13 -3)

📄 Description

Summary

This PR adds per-request decode expert cache hit rate metrics to the engine DONE line and displays them in the web monitor:

  1. Decode Baseline Isolation:

    • Records cache_hits and lookups baseline at the start of autoregressive decode, excluding prompt prefill lookups from token generation hit rate statistics.
    • Computes
      eq_hits and
      eq_look for the decode phase alone and appends them to the engine's DONE line:
      DONE [hits] [lookups]
    • Emits a clean log line to stderr:
      strata serve: decode expert cache hit rate: 36.8% (5185 / 14107 hits)
  2. Web Monitor Integration:

    • Parses the two optional fields in StrataEngine._parse_done() (backward compatible if omitted).
    • Computes hit_rate in Server.run() and records it in request history.
    • Adds a Hit rate column to the Recent requests table in index.html and formats it in pp.js.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/69 **Author:** [@code-martin](https://github.com/code-martin) **Created:** 9/28/2026 **Status:** ✅ Merged **Merged:** 9/28/2026 **Merged by:** [@Niko1221](https://github.com/Niko1221) **Base:** `main` ← **Head:** `feature/decode-hit-rate-telemetry` --- ### 📝 Commits (1) - [`75e50e6`](https://github.com/Niko1221/Strata/commit/75e50e64e714200410e34825e5839eb6af6e7416) telemetry: per-request decode expert cache hit rate in DONE and web monitor ### 📊 Changes **4 files changed** (+25 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+7 -2) 📝 `serve/web/app.js` (+3 -2) 📝 `serve/web/index.html` (+2 -2) 📝 `src/program/generate.cpp` (+13 -3) </details> ### 📄 Description ### Summary This PR adds per-request decode expert cache hit rate metrics to the engine DONE line and displays them in the web monitor: 1. **Decode Baseline Isolation**: - Records cache_hits and lookups baseline at the start of autoregressive decode, excluding prompt prefill lookups from token generation hit rate statistics. - Computes eq_hits and eq_look for the decode phase alone and appends them to the engine's DONE line: DONE <generated> <prompt> <prompt ms> <decode ms> <finish> <drafts accepted> <drafts offered> <reused> [hits] [lookups] - Emits a clean log line to stderr: strata serve: decode expert cache hit rate: 36.8% (5185 / 14107 hits) 2. **Web Monitor Integration**: - Parses the two optional fields in StrataEngine._parse_done() (backward compatible if omitted). - Computes hit_rate in Server.run() and records it in request history. - Adds a **Hit rate** column to the *Recent requests* table in index.html and formats it in pp.js. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:09 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2439
No description provided.