Ticket #308: qp-skip-for-poor-timer-granularity.patch

File qp-skip-for-poor-timer-granularity.patch, 674 bytes (added by Olly Betts, 16 years ago)

Backported patch

  • queryparsertest.cc

     
    17961796    // Allow a factor of 2 difference, to cover random variation.
    17971797    // First, we test a simple query.
    17981798    time1 = time_query_parse(db, q1, repetitions, defflags);
     1799
     1800    if (time1 == 0.0) {
     1801        // The first test completed before the timer ticked at all!
     1802        SKIP_TEST("Timer granularity is too coarse");
     1803    }
     1804
    17991805    time2 = time_query_parse(db, q2, 1, defflags);
    18001806    tout << "defflags: small=" << time1 << "s, large=" << time2 << "s\n";
    18011807    TEST_LESSER(time2, time1 * 2);