MDEV-8981: Analyze stmt - cycles can overflow
A 64bit counter can overflow within the time of a query so lets take it that the measurement is the small value rather than an order 1e12 millisecond query. tested with: int main() { ulonglong start = ULONGLONG_MAX - 30; ulonglong end = 600; ulonglong cycles = 10000; cycles += end - start; if (unlikely(end < start)) cycles += ULONGLONG_MAX; printf("cycles %llu\n", cycles); }
Showing
Please register or sign in to comment