feat(evals): add automated usage metrics reporting for behavioral evals

This commit is contained in:
Michael Bleigh
2026-04-09 16:39:55 -07:00
parent a7a091360e
commit 770db15ca5
10 changed files with 404 additions and 5 deletions
+12
View File
@@ -36,6 +36,10 @@ import {
CoreToolCallStatus,
IntegrityDataStatus,
} from '@google/gemini-cli-core';
import {
getUsageMetrics,
type UsageMetrics,
} from '@google/gemini-cli-test-utils';
import {
type MockShellCommand,
MockShellExecutionService,
@@ -477,6 +481,14 @@ export class AppRig {
return this.testDir;
}
/**
* Scans the session recordings and extracts aggregate token usage and turn counts.
* This provides an empirical measure of the agent's efficiency and cost.
*/
getUsageMetrics(): UsageMetrics {
return getUsageMetrics(this.testDir);
}
getPendingConfirmations() {
return Array.from(this.pendingConfirmations.values());
}