Re:Fast Transaction Log: Windows
by jschwartzi on Wednesday July 13, 2016 @05:01PM
(#12089632)
gettimeofday() is totally inappropriate for benchmarking. Any time the system clock is being adjusted by NTP, for instance, your benchmark timing will be skewed.
They should be using the following API if they're going to use the system time to measure time differences:
clock_gettime(CLOCK_MONOTONIC, ×pec);
It's a really good clue that a timing function is inappropriate for benchmarking when the man page talks about time zones.
They should be using the following API if they're going to use the system time to measure time differences:
clock_gettime(CLOCK_MONOTONIC, ×pec);
It's a really good clue that a timing function is inappropriate for benchmarking when the man page talks about time zones.