User Activity

My main purpose here is to write sensor data into the text file. Planning to send the data through COM port and read and write the data into the text file using MATLAB. This is the only way to write the data into text file that I am thinking about wi...
 I am wondering, how can I measure the program execution cycle speed? How fast while(1) section loops and how fast I can read the values from the sensors? This is the particular thing I wanna find out about.Thanks,Enes