Ok, So I'm in the process of finalizing my first map and I wanted to do some optimization work on it. Everything runs fine on my machine (but it's beefy enough for that to tell me nothing) so I was wondering what tools in-engine I should be using to see how the .bsp has broken things down and to find troublespots.

I've taken a bit of a look using r_speeds / r_speeds_graph - but that's information overload ATM so I think I need some advice on what's important to pay attention to.

Also, are there any in-engine features for examining how the .bsp has broken everything down into portals? That seems like it would be handy for identifying where I might want to convert a few brushes to func_detail.

You can use r_showtris and r_showdisabledepthtest to see all the geometry that is processed by the video card.

r_speeds is quite a mess. I mostly pay attention to the world triangle count. In my experience, a reasonable limit is 50'000 visible triangles, maybe up to 100'000 depending on the textures and map size.

The timedemo feature is very useful as well (Menu > Multiplayer > Media > Demos > Timedemo). Simply record a normal demo where you run around the entire map. Then play it as a timedemo, to get an objective performance measurement (written to data/benchmark.log). Replay the timedemo after editing the map to see the impact on performance.

For comparison, you could also perform timedemo measurements on default maps.