How to performance profile a Windows Service remotely?

2020-02-15 c# windows performance windows-services

I'm wondering if there's a way I can remotely profile a Windows Service within Visual Studio. If not is there a way I can generate the profile report and import it into VS?

Some context, the server has several serial connections we cannot mimic locally, so the only way to have the service run is on the test server. Therefore, I cannot use the builtin performance tools within VS.

The server is Windows Server 2012 R2 and I would like to get some metrics about how the service is running on initialization, during normal load, and with maximum users. Any tips or tricks would be fantastic!