Figure 1: Current measuring setup.
A test application gradually changes the screen's color (from black to white) and logs timestamps.
In a separate thread, XShm is used to read the color of one pixel. Supposedly because of the display being locked by the test application, there are periods without XShm measurements around the time the test application is rendering.
Additionally, XDamageNotify events are logged and they seem to occur right after the test application has finished rendering.


Figure 2: Benchmark test for XShm.
In this test, XShm was used to read a pixel as fast as possible without a test application running.
Delay spikes also occur in this setup, however they are shorter and less frequent.