mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-14 07:10:34 -07:00
Show raw input token counts in json output. (#15021)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -92,6 +92,7 @@ describe('SessionStatsContext', () => {
|
||||
totalLatencyMs: 123,
|
||||
},
|
||||
tokens: {
|
||||
input: 50,
|
||||
prompt: 100,
|
||||
candidates: 200,
|
||||
total: 300,
|
||||
@@ -171,6 +172,7 @@ describe('SessionStatsContext', () => {
|
||||
'gemini-pro': {
|
||||
api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
|
||||
tokens: {
|
||||
input: 10,
|
||||
prompt: 10,
|
||||
candidates: 20,
|
||||
total: 30,
|
||||
@@ -212,6 +214,7 @@ describe('SessionStatsContext', () => {
|
||||
'gemini-pro': {
|
||||
api: { totalRequests: 2, totalErrors: 0, totalLatencyMs: 200 },
|
||||
tokens: {
|
||||
input: 20,
|
||||
prompt: 20,
|
||||
candidates: 40,
|
||||
total: 60,
|
||||
|
||||
@@ -37,6 +37,7 @@ function areModelMetricsEqual(a: ModelMetrics, b: ModelMetrics): boolean {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
a.tokens.input !== b.tokens.input ||
|
||||
a.tokens.prompt !== b.tokens.prompt ||
|
||||
a.tokens.candidates !== b.tokens.candidates ||
|
||||
a.tokens.total !== b.tokens.total ||
|
||||
@@ -159,6 +160,7 @@ export interface ComputedSessionStats {
|
||||
successRate: number;
|
||||
agreementRate: number;
|
||||
totalCachedTokens: number;
|
||||
totalInputTokens: number;
|
||||
totalPromptTokens: number;
|
||||
totalLinesAdded: number;
|
||||
totalLinesRemoved: number;
|
||||
|
||||
Reference in New Issue
Block a user