mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
Add active context token counts to compaction analytics
This commit is contained in:
@@ -270,6 +270,8 @@ fn compaction_event_serializes_expected_shape() {
|
||||
mode: CompactionMode::Remote,
|
||||
status: CompactionStatus::Completed,
|
||||
error: None,
|
||||
active_context_tokens_before: 120_000,
|
||||
active_context_tokens_after: 18_000,
|
||||
started_at: 100,
|
||||
completed_at: 106,
|
||||
duration_ms: Some(6543),
|
||||
@@ -289,6 +291,8 @@ fn compaction_event_serializes_expected_shape() {
|
||||
"mode": "remote",
|
||||
"status": "completed",
|
||||
"error": null,
|
||||
"active_context_tokens_before": 120000,
|
||||
"active_context_tokens_after": 18000,
|
||||
"started_at": 100,
|
||||
"completed_at": 106,
|
||||
"duration_ms": 6543
|
||||
@@ -507,6 +511,8 @@ async fn compaction_event_ingests_custom_fact() {
|
||||
mode: CompactionMode::Local,
|
||||
status: CompactionStatus::Failed,
|
||||
error: Some("context limit exceeded".to_string()),
|
||||
active_context_tokens_before: 131_000,
|
||||
active_context_tokens_after: 131_000,
|
||||
started_at: 100,
|
||||
completed_at: 101,
|
||||
duration_ms: Some(1200),
|
||||
|
||||
Reference in New Issue
Block a user