When debugging or optimizing sessions, developers need an intuitive view of Token consumption, Wall time, and cache hit rate. Existing views may lack fine-grained statistics by model or by turn. This plugin adds a Usage tab to the session interface, providing detailed data views by model and by turn.
Plugin Introduction¶
This is a client-side plugin for viewing Token, Wall time, and cache hit rate in a session. It does not modify the DeepSeek Harness source code; it only reads and displays data. It is maintained by ewoowe.
Core Features¶
- New Usage tab in the session: Displays session totals in the session interface.
- Two table views:
- Model usage (default): Shows Token, Wall time, and Cache hit details by model.
- Message usage: Shows Token, Wall time, and Cache hit details by turn.
- Sorting and filtering:
- The Message usage table supports clicking table headers to sort by any column.
- Supports multiple time-range filters: Session, Today, 24h, Yesterday, 3d, 7d, Custom.
- History loading:
- Shows turn coverage within the loaded window (e.g., Folded 12 of 22 turns).
- Provides a Load the older turns button to load history.
- Data calculation:
- Uses ISession.projections to calculate overall statistics.
- Depends on
@deepseek-ai/cordis,react,react-dom, and other dependencies.
Typical Usage¶
- Switch between Model usage and Message usage table views in the session.
- Click any column header in Message usage to sort the table.
- Select a time range such as Today or 7 days to view statistics for a specific period.
- Click Load the older turns to load history and view folded turns.
- View cache hit percentages with decimal places (e.g., 99.95).
Use Cases and Notes¶
- Use case: Suitable for developers who need to analyze session cost and performance in detail.
- Concept clarification: Each row in the table represents a turn (a Prompt and its corresponding Assistant response), not a single message. An Assistant response belongs to the same turn as the Prompt that initiated it.
- Time range: The Today range only counts time spent within the session, not the current system date.
- Cache hit rate: Percentage values are not capped and retain decimals (e.g., 99.95).
- Dependencies: Requires libraries such as
@deepseek-ai/cordis,react,react-dom. - License: MIT.
- Source code safety: The plugin only reads and displays data; it does not modify the
packages/directory.
Summary¶
The plugin calculates data using ISession.projections and event windows, providing visualization support for session analysis. For more details, visit the SkillHub directory or GitHub.