First, instrument the EXE or DLL by command
Vsinstr-coverage the Dll/exe
Second, start the Performance Monitor
Vsperfcmd.exe/start:coverage/output: "D:\Latest.Coverage"/cs/user: "Everyone"
At this time, we could check the status by running command:
Vsperfcmd.exe/status
Third, start the Windows service and execute the test scenario.
Fourth, shut down the Performance Monitor tool by
Vsperfcmd.exe/shutdown
Trouble shooting:
On the "machines", could not get the coverage, instead it shows message:
Empty results Generated:no binaries were instrumented. Make sure the tests ran, required binaries were loaded, had matching symbol files, and were not excluded through custom SE Ttings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731
And in the event view, have error with Source:vsperf
Unable to connect to monitor. Make sure the monitor was started and in the correct mode.
Resolving by:
Run the above command from the tools for x64 machines, it located at
C:\Program Files (x86) \microsoft Visual Studio 12.0\team tools\performance tools\x64