Skip to content

Commit

Permalink
Use appStarted instead of beforeApplicationStarted
Browse files Browse the repository at this point in the history
Use StartUpMeasurer.getStartTime as the start point for reportApplicationLoaded

Measure indexes are ready

Load solution asynchronously without modal progress (as it works in real life)

Convert shellhost into a service + listener

Add editBackendSettingsSuspending + use the suspend version in perforator

Refactor PerformancePlugin logic to coroutines

Increment some metrics after changes the way we open a solution and calculate ApplicationLoad and BackendShellLoad

GitOrigin-RevId: 6c691c86209fb67ef4767d0e7432735a44e19e17
  • Loading branch information
Iliya-usov authored and intellij-monorepo-bot committed Aug 31, 2024
1 parent 9c0140d commit 2f2e9c1
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ import com.intellij.execution.configurations.GeneralCommandLine
import com.intellij.execution.process.CapturingProcessHandler
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.SystemInfo
import com.intellij.openapi.vfs.LocalFileSystem
import com.jetbrains.rider.protocol.IProtocolHost
import com.jetbrains.rider.protocol.protocolHost
import com.jetbrains.rdclient.util.idea.callSynchronously
import com.jetbrains.rider.RiderEnvironment
import com.jetbrains.rider.plugins.fsharp.rdFSharpModel
import com.jetbrains.rider.projectView.solution
import com.jetbrains.rider.protocol.IProtocolHost
import com.jetbrains.rider.protocol.protocolHost
import com.jetbrains.rider.settings.RiderSettingMaintenanceController
import com.jetbrains.rider.test.base.BaseTestWithSolution
import com.jetbrains.rider.test.framework.frameworkLogger
import com.jetbrains.rider.test.framework.waitBackend
import com.jetbrains.rider.test.scriptingApi.BackendSettingsEditorBase
import com.jetbrains.rider.test.scriptingApi.dumpSevereHighlighters
import com.jetbrains.rider.test.scriptingApi.editBackendSettings
import com.jetbrains.rider.test.scriptingApi.editBackendSettingsSuspending
import com.jetbrains.rider.test.scriptingApi.runBlockingWithFlushing
import java.io.PrintStream
import java.nio.file.Path
import kotlin.time.Duration.Companion.minutes

fun com.intellij.openapi.editor.Editor.dumpTypeProviders(stream: PrintStream) {
with(stream) {
Expand Down Expand Up @@ -105,11 +104,13 @@ fun flushFileChanges(project: Project) {

val Project.fcsHost get() = this.solution.rdFSharpModel.fsharpTestHost

class FsharpBackendSettingsEditor(host: IProtocolHost) : BackendSettingsEditorBase(host) {
class FsharpBackendSettingsEditor(host: IProtocolHost) : BackendSettingsEditorBase(host.session) {
var dotnetCliHomeEnvVar by StringEnvVar("DOTNET_CLI_HOME")
}

fun editFSharpBackendSettings(host: IProtocolHost, action: FsharpBackendSettingsEditor.() -> Unit) =
editBackendSettings(FsharpBackendSettingsEditor(host), action)
runBlockingWithFlushing("editFSharpBackendSettings", 1.minutes) {
editBackendSettingsSuspending(FsharpBackendSettingsEditor(host), action)
}


0 comments on commit 2f2e9c1

Please sign in to comment.