How to ensure a fragment shader only runs once
I don't think your approach is viable for a variety of reasons.


a GPU is heavily cache-dependent for performance. Pulling the same pixels over and over will just measure how fast a cache hit is. Sampling random pixels will only measure a cache miss. Neither are useful statistics. 
each texture2d call will pull in multiple pixels to leverage that, in a fragment shader, neighbouring fragments will want neighbouring pixels.
The driver could optimize your shader to pull out the loop if it sees that each iteration does the exact same computation or if the computed result is not used.