I guess it depends on the camera. Some (API) functions are sometimes not implemented in OpenCV and / or are supported by your camera. It would be best if you check the code on github.
Regarding your problem: I can get the frame rate with a regular webcam and a XIMEA camera with your code.
Tested:
- Ubuntu 15.04 64bit
- OpenCV 3.0.0, compiled with Qt and XIMEA camera support
You can measure the frame rate yourself:
double t1 = (double)cv::getTickCount();
// do something
t1 = ((double)cv::getTickCount() - t1)/cv::getTickFrequency();
Gives you time spent on //do something.