Is there an open source tool to measure cpu performance?
You should take a look at the Wikipedia page on benchmarking, it gives quite a few benchmark tools including the CPU ones that will work on Linux. LinPack is free but a pain to compile. But you can certainly look at NBench and some others in the list.
$ date; i=0; while (( i < 1000000 )); do (( i ++ )); done; date
Tue Jul 15 11:26:37 EDT 2014
Tue Jul 15 11:26:43 EDT 2014
$
stress-ng is a simple tool that can stress and benchmark the cpus.
For example, tested 1 cpu
stress-ng -c 1 --cpu-ops 5000
stress-ng: info: [20288] defaulting to a 86400 second run per stressor
stress-ng: info: [20288] dispatching hogs: 1 cpu
stress-ng: info: [20288] successful run completed in 13.93s