Performance Monitor
The Performance Monitor build feature allows you to get the statistics on the CPU, disk and memory usage during a build run on a build agent. When enabled, each build has an additional tab called PerfMon on the build results page, where this statistics is presented as a graph. You can also click on points in the chart to see the corresponding part of the build log.
For example, from the picture below it is clear that at some point the CPU and Disk usage is very low. This lasts for about 20 minutes. It seems that the tests executing at this time need some investigation, probably, most of the time they are blocked on some lock or wait for some event:
The Performance monitor supports Windows, Linux, Solaris and MacOS X operating systems. Note that the performance monitor reports the load of the whole operating system. It will not report proper results if you have more than one agent running on the same host, or an agent and a server installed on the same machine.