I'm testing out a new CDN service (http://cloudflare.com), and I'm trying to figure out if it is giving much of a gain. I have a very fast internet connection so I can't see any increase in speed (though I realize since I am fairly close to my server I shouldn't see a big gain anyway compared to international users), but I'd like to calculate how much gain there actually is. Is there anyway to do this?
You could try http://www.webpagetest.org to test both the site through cloudflare and straight to your server from different locations and bandwidth, and see how the two compare. Keep in mind that the performance is related to user's geographic location, so you need to look at your users - where the come from, and than compare the performance numbers from those cities.
Alternatively you could try paid services like (listed alphabetically):
http://www.Alertsite.com
http://www.Catchpoint.com
http://www.Gomez.com
http://www.keynote.com
http://www.webmetrics.com
The two benefits you should see are
For 1, you should be able to look at your CPU/Mem utilisation graphs for your service and see a reduction in load.
For 2, you need to measure remotely. The only firm I've ever worked with on this is Gomez. I am sure that there are others.
From your phrasing 'gain' means end-user performance changes? There is a measurement tool that uses client-side javascript measurements: http://stevesouders.com/episodes/
Other gains are in server load and bandwidth reduction on your servers, here a general purpose monitoring tool like munin would work well.