Currently the timing metrics collected use a realtime clock provided by time.Now(). This is inaccurate for timing purposes where we care about the actual amount of time that has passed vs. the time that has passed in the "real" wall-clock time. Clock adjustments can provide wildly inaccurate timing for short-term actions. The answer, unfortunately, is to create a package that can provide a raw monotonic clock read by calling clock_gettime through VDSO.
This must be done in assembly to conform to the C calling conventions. This is a paved path, which is really nice for us. spacemonkeygo has a proper package to do this:
https://github.com/spacemonkeygo/monotime/blob/master/mono_linux_amd64.s
This code can be added to the rend project (along with proper license handling) to handle raw monotonic time.
Currently the timing metrics collected use a realtime clock provided by
time.Now(). This is inaccurate for timing purposes where we care about the actual amount of time that has passed vs. the time that has passed in the "real" wall-clock time. Clock adjustments can provide wildly inaccurate timing for short-term actions. The answer, unfortunately, is to create a package that can provide a raw monotonic clock read by calling clock_gettime through VDSO.This must be done in assembly to conform to the C calling conventions. This is a paved path, which is really nice for us. spacemonkeygo has a proper package to do this:
https://github.com/spacemonkeygo/monotime/blob/master/mono_linux_amd64.s
This code can be added to the rend project (along with proper license handling) to handle raw monotonic time.