Skip to content

feat: add compression time to /dcp stats#471

Open
spoons-and-mirrors wants to merge 6 commits intodevfrom
feat/compression-time
Open

feat: add compression time to /dcp stats#471
spoons-and-mirrors wants to merge 6 commits intodevfrom
feat/compression-time

Conversation

@spoons-and-mirrors
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd7937574f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds tracking and reporting of how long it takes the LLM to generate compress tool inputs, and surfaces that metric in /dcp stats.

Changes:

  • Track per-compress tool-call “pending → running” duration and accumulate it into session stats.
  • Persist and reset the new compressionTimeMs stat, and add a compressionStarts map to session state.
  • Display the new metric in /dcp stats and add tests for the event hook behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/hooks-permission.test.ts Adds tests validating event-hook timing accumulation and filtering to compress only.
lib/state/types.ts Extends session state/types with compressionTimeMs and compressionStarts.
lib/state/state.ts Initializes, resets, and loads the new session stat and map.
lib/hooks.ts Adds createEventHandler that records compress input-generation durations from events.
lib/compress/range.ts Removes an extraneous stray character/line in the tool implementation.
lib/compress/message.ts Removes an extraneous stray character/line in the tool implementation.
lib/commands/stats.ts Prints the new compression/summary time metric in /dcp stats.
index.ts Registers the new event hook handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants