I\'m writing a small program in C, and I want to measure it\'s performance.
I want to see how much time do it run in the processor and how many cache hit+misses has
The best tool for you is called valgrind. It is capable of memory profiling, call-graph building and much more.
sudo apt get install valgrind valgrind ./yourapp
However, to obtain the time your program executed, you can use time(8) linux utility.
time(8)
time ./yourapp