Skip to content

Commit 0bc5cb1

Browse files
Samiya CaurDevtools-frontend LUCI CQ
authored andcommitted
Update register user impression time calculation to avoid decimals
Bug: 436203675 Change-Id: I3e21dd2016d0a786b99e9e69b2f2e28c5d0ecddf Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6866470 Commit-Queue: Samiya Caur <[email protected]> Reviewed-by: Ergün Erdoğmuş <[email protected]> Auto-Submit: Samiya Caur <[email protected]> Commit-Queue: Ergün Erdoğmuş <[email protected]>
1 parent 88fdacf commit 0bc5cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front_end/models/ai_code_completion/AiCodeCompletion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export class AiCodeCompletion extends Common.ObjectWrapper.ObjectWrapper<EventTy
223223
#registerUserImpression(rpcGlobalId: Host.AidaClient.RpcGlobalId, sampleId: number, latency: number): void {
224224
const seconds = Math.floor(latency / 1_000);
225225
const remainingMs = latency % 1_000;
226-
const nanos = remainingMs * 1_000_000;
226+
const nanos = Math.floor(remainingMs * 1_000_000);
227227

228228
void this.#aidaClient.registerClientEvent({
229229
corresponding_aida_rpc_global_id: rpcGlobalId,

0 commit comments

Comments
 (0)