Log more information when cpuNanos metrics is zero

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-12-28
    • 13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In this test, 'cpuNanos' occasionally returns '0' instead of a positive integer.

      I believe this may happen if the OS migrates a thread to a different CPU, which could lead to bogus results, per the man page:

      The CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clocks are realized on many platforms using timers from the CPUs (TSC on i386, AR.ITC on Itanium). These registers may differ between CPUs and as a consequence these clocks may return bogus results if a process is migrated to another CPU.

      The test failures have always resulted in values of exactly 0 elapsed time (never negative) which suggests something else could be going on as well.

      Print more diagnostic information when operations return 0 cpuNanos.

            Assignee:
            Louis Williams
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: