Skip to content

Commit 1205101

Browse files
authored
telemetry(amazonq): change code percentage event to not consider modification (#5696)
## Problem Product thinks that code percentage event should not consider user modification ## Solution use raw accepted token count (without considering modification) for the percentage field in toolkit telemetry there is no change to STE --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 68f6c38 commit 1205101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/codewhisperer/tracker/codewhispererCodeCoverageTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class CodeWhispererCodeCoverageTracker {
120120
}
121121
})
122122
}
123-
const percentCount = ((unmodifiedAcceptedTokens / totalTokens) * 100).toFixed(2)
123+
const percentCount = ((acceptedTokens / totalTokens) * 100).toFixed(2)
124124
const percentage = Math.round(parseInt(percentCount))
125125
const selectedCustomization = getSelectedCustomization()
126126
if (this._serviceInvocationCount <= 0) {

0 commit comments

Comments
 (0)