I'm by no means a MELSEC expert but I have used some Mitsubishi Fx series PLCs, so I'll take a stab at it.
The ladder you posted clears some data registers and programatically determines how long the program scan time is in microseconds.
The output instruction on the first rung is a File Move. It is going to place the number 0 in 10 consecutive registers beginning at R996.
The output instruction on the next rung is a Pulse instruction. It will turn the bit M999 on for only one full scan of the PLC program when M9034 goes true.
The third rung first moves a Zero into register 996 and then turns off the bit at M995. This is triggerd by the single shot bit set up using the PLS instruction in the previous rung. Thus the second and third rungs function so that when M9034 goes true, R996 is set to 0 and M995 is turned off just one time.
As soon as this occurs, timer #210 starts in the next rung. This timer will count for 2500 counts. What I dont know is what the time base is for this timer. It might be milliseconds (2.5 seconds) or 10 milliseconds (25 seconds) or 100 milliseconds (250 seconds). You will have to look up the time base for timer 210 in the manual for the particular PLC model.
In the next rung, as long as the timer has not reached its preset of 2500, it increments R996 by 1. It will increment by one scan while the timer is timing, thus counting the number of times the program is executed during the timing period of the timer 210.
At the end of the time period bit M995 is turned on, and the number 25,000,000 is divided by the number of scans that was counted in the previous rung. The result is stored at R1000. This gives you the program execution time in microseconds, averaged out over the timing period.
The Mitsubishi manuals are available here:
http://www.meau.com/eprise/main/sites/public/DOWNLOADS/Manuals/default
edited to add: OK, now that I think about it, the timer at 210 has to be a millisecond timer for 2.5 seconds, because according to the comment the program time is in microseconds and the scan count is divided into 25 milliion. Mabye some of the real mitsubishi gurus here can confirm that.