mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-13 15:40:57 -07:00
Record timestamp with code assist metrics. (#15439)
This commit is contained in:
committed by
GitHub
parent
dced409ac4
commit
d18c96d6a1
@@ -184,6 +184,9 @@ describe('CodeAssistServer', () => {
|
||||
firstMessageLatency: expect.stringMatching(/\d+s/),
|
||||
}),
|
||||
}),
|
||||
timestamp: expect.stringMatching(
|
||||
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,
|
||||
),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
@@ -244,6 +247,9 @@ describe('CodeAssistServer', () => {
|
||||
conversationOffered: expect.objectContaining({
|
||||
traceId: 'stream-trace-id',
|
||||
}),
|
||||
timestamp: expect.stringMatching(
|
||||
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,
|
||||
),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
@@ -266,6 +272,9 @@ describe('CodeAssistServer', () => {
|
||||
metrics: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
conversationInteraction: interaction,
|
||||
timestamp: expect.stringMatching(
|
||||
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,
|
||||
),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
|
||||
@@ -241,7 +241,7 @@ export class CodeAssistServer implements ContentGenerator {
|
||||
await this.recordCodeAssistMetrics({
|
||||
project: this.projectId,
|
||||
metadata: await getClientMetadata(),
|
||||
metrics: [{ conversationOffered }],
|
||||
metrics: [{ conversationOffered, timestamp: new Date().toISOString() }],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -255,7 +255,12 @@ export class CodeAssistServer implements ContentGenerator {
|
||||
await this.recordCodeAssistMetrics({
|
||||
project: this.projectId,
|
||||
metadata: await getClientMetadata(),
|
||||
metrics: [{ conversationInteraction: interaction }],
|
||||
metrics: [
|
||||
{
|
||||
conversationInteraction: interaction,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user