You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/credentials/CodeWhispererClientAdaptor.kt
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,18 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
304
304
val programmingLanguage = fileContext.programmingLanguage
305
305
var e2eLatency = sessionContext.latencyContext.getCodeWhispererEndToEndLatency()
306
306
307
+
// service side will only aggregate perceivedLatency with non-zero value
308
+
// For client-side, if the decision is not accept and reject, we will set the value to 0
309
+
// If the decision is accept or reject, it's guaranteed that they will need a perceivedLatency
310
+
// of non-zero because for accept case it's trivial, for reject case, this trigger must be the
311
+
// first seen trigger and this is the only one reject in this display session.
312
+
val emittedPerceivedLatency =
313
+
if (suggestionState ==CodewhispererSuggestionState.Accept|| suggestionState ==CodewhispererSuggestionState.Reject) {
314
+
sessionContext.latencyContext.perceivedLatency
315
+
} else {
316
+
0.0
317
+
}
318
+
307
319
// When we send a userTriggerDecision of Empty or Discard, we set the time users see the first
308
320
// suggestion to be now.
309
321
if (e2eLatency <0) {
@@ -320,7 +332,7 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
0 commit comments