Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ class DefaultCodeWhispererFileContextProvider(private val project: Project) : Fi
}

return supplementalContext?.let {
val latency = System.currentTimeMillis() - startFetchingTimestamp
if (it.contents.isNotEmpty()) {
val logStr = buildString {
append("Successfully fetched supplemental context with strategy ${it.strategy} with ${it.latency} ms")
append("Successfully fetched supplemental context with strategy ${it.strategy} with $latency ms")
it.contents.forEachIndexed { index, chunk ->
append(
"""
Expand All @@ -166,8 +167,7 @@ class DefaultCodeWhispererFileContextProvider(private val project: Project) : Fi
LOG.warn { "Failed to fetch supplemental context, empty list." }
}

// TODO: fix this latency
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was indeed correct, the incorrect part is the above log entry

it.copy(latency = System.currentTimeMillis() - startFetchingTimestamp)
it.copy(latency = latency)
}
} catch (e: TimeoutCancellationException) {
LOG.debug {
Expand Down
Loading